diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2011-12-02 23:38:33 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2011-12-02 23:38:33 +0200 |
commit | b6f9834a9e8dfab1bd503ec0357bb812a18018a2 (patch) | |
tree | af287b909151e04a6975a548985276ee53885bed | |
parent | 0de93a9c69a13073ed27c8d53f8c83663d3561fd (diff) | |
download | postgresql-b6f9834a9e8dfab1bd503ec0357bb812a18018a2.tar.gz postgresql-b6f9834a9e8dfab1bd503ec0357bb812a18018a2.zip |
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.
-rw-r--r-- | src/bin/psql/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 9cc73beabff..f885c1d74fe 100644 --- a/src/bin/psql/command.c +++ b/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 |