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.
This commit is contained in:
parent
0de93a9c69
commit
b6f9834a9e
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user