projects
/
users
/
kgrittn
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0de93a9
)
psql: Make temporary editor files have .sql extension
author
Peter Eisentraut
<peter_e@gmx.net>
Fri, 2 Dec 2011 21:38:33 +0000
(23:38 +0200)
committer
Peter Eisentraut
<peter_e@gmx.net>
Fri, 2 Dec 2011 21:38:33 +0000
(23:38 +0200)
This gives editors a better chance to treat these files as the SQL
files that they are.
src/bin/psql/command.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/command.c
b/src/bin/psql/command.c
index 9cc73beabff615430393456d093c8880e322d4fb..f885c1d74fec6afd15b74d57d019690be71887e1 100644
(file)
--- 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