Add semicolons to end of internally run queries
authorPeter Eisentraut <[email protected]>
Thu, 30 Aug 2018 17:23:22 +0000 (19:23 +0200)
committerPeter Eisentraut <[email protected]>
Thu, 30 Aug 2018 17:23:22 +0000 (19:23 +0200)
This ensures that the --echo output of various tools (under scripts) is
valid multiline SQL.

Author: Tatsuro Yamada <[email protected]>

src/bin/scripts/common.c
src/include/fe_utils/connect.h

index 29f5c97fafe9b84b6840463aa6f09169224780e9..ba6120706d6d69318fcca3321aa165114f917e8a 100644 (file)
@@ -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.
index fa293d2458d802c8532106688503727424b4931b..d62f5a37243fb6ce5753ea57b7b21ff0d096c08b 100644 (file)
@@ -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 */