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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy