psql-edit-filename.patch
text/x-patch
Filename: psql-edit-filename.patch
Type: text/x-patch
Part: 0
Message:
psql editor temp file extension
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/command.c | 2 | 2 |
diff --git i/src/bin/psql/command.c w/src/bin/psql/command.c index 9cc73be..f885c1d 100644 --- i/src/bin/psql/command.c +++ w/src/bin/psql/command.c @@ -1879,10 +1879,10 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf, */ #endif #ifndef WIN32 - snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d", tmpdir, + snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d.sql", tmpdir, "/", (int) getpid()); #else - snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d", tmpdir, + snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d.sql", tmpdir, "" /* trailing separator already present */ , (int) getpid()); #endif