diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-08-30 19:23:22 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-08-30 19:23:22 +0200 |
commit | 7061e03319d9a31f02d3777ca856b6c33e7a0967 (patch) | |
tree | 97a152566a89b59160addbc8ea00a549a99ebf34 /src | |
parent | daa9fe8a5264a3f192efa5ddee8fb011ad9da365 (diff) | |
download | postgresql-7061e03319d9a31f02d3777ca856b6c33e7a0967.tar.gz postgresql-7061e03319d9a31f02d3777ca856b6c33e7a0967.zip |
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>
Diffstat (limited to 'src')
-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 29f5c97fafe..ba6120706d6 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 fa293d2458d..d62f5a37243 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 */ |