Skip to content

Commit b6f9834

Browse files
committed
psql: Make temporary editor files have .sql extension
This gives editors a better chance to treat these files as the SQL files that they are.
1 parent 0de93a9 commit b6f9834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/command.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1879,10 +1879,10 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf,
18791879
*/
18801880
#endif
18811881
#ifndef WIN32
1882-
snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d", tmpdir,
1882+
snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d.sql", tmpdir,
18831883
"/", (int) getpid());
18841884
#else
1885-
snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d", tmpdir,
1885+
snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d.sql", tmpdir,
18861886
"" /* trailing separator already present */ , (int) getpid());
18871887
#endif
18881888

0 commit comments

Comments
 (0)