postgres.git / summary / log / commit / refs
commit b6f9834a9e8dfab1bd503ec0357bb812a18018a2
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Fri Dec 02 21:38:33 2011 +0000
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.
src/bin/psql/command.c | 4 ++--
1 file 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
[parent: 0de93a9c69a1]