Skip to content

Commit 7061e03

Browse files
committed
Add semicolons to end of internally run queries
This ensures that the --echo output of various tools (under scripts) is valid multiline SQL. Author: Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>
1 parent daa9fe8 commit 7061e03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bin/scripts/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ appendQualifiedRelation(PQExpBuffer buf, const char *spec,
335335
appendStringLiteralConn(&sql, table, conn);
336336
appendPQExpBufferStr(&sql, "::pg_catalog.regclass;");
337337

338-
executeCommand(conn, "RESET search_path", progname, echo);
338+
executeCommand(conn, "RESET search_path;", progname, echo);
339339

340340
/*
341341
* One row is a typical result, as is a nonexistent relation ERROR.

src/include/fe_utils/connect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
* might work with the old server, skip this.
2424
*/
2525
#define ALWAYS_SECURE_SEARCH_PATH_SQL \
26-
"SELECT pg_catalog.set_config('search_path', '', false)"
26+
"SELECT pg_catalog.set_config('search_path', '', false);"
2727

2828
#endif /* CONNECT_H */

0 commit comments

Comments
 (0)