diff options
author | Peter Eisentraut | 2018-08-30 17:23:22 +0000 |
---|---|---|
committer | Peter Eisentraut | 2018-08-30 17:23:22 +0000 |
commit | 7061e03319d9a31f02d3777ca856b6c33e7a0967 (patch) | |
tree | 97a152566a89b59160addbc8ea00a549a99ebf34 | |
parent | daa9fe8a5264a3f192efa5ddee8fb011ad9da365 (diff) |
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 <[email protected]>
-rw-r--r-- | src/bin/scripts/common.c | 2 | ||||
-rw-r--r-- | src/include/fe_utils/connect.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index 29f5c97faf..ba6120706d 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -335,7 +335,7 @@ appendQualifiedRelation(PQExpBuffer buf, const char *spec, appendStringLiteralConn(&sql, table, conn); appendPQExpBufferStr(&sql, "::pg_catalog.regclass;"); - executeCommand(conn, "RESET search_path", progname, echo); + executeCommand(conn, "RESET search_path;", progname, echo); /* * One row is a typical result, as is a nonexistent relation ERROR. diff --git a/src/include/fe_utils/connect.h b/src/include/fe_utils/connect.h index fa293d2458..d62f5a3724 100644 --- a/src/include/fe_utils/connect.h +++ b/src/include/fe_utils/connect.h @@ -23,6 +23,6 @@ * might work with the old server, skip this. */ #define ALWAYS_SECURE_SEARCH_PATH_SQL \ - "SELECT pg_catalog.set_config('search_path', '', false)" + "SELECT pg_catalog.set_config('search_path', '', false);" #endif /* CONNECT_H */ |