summaryrefslogtreecommitdiff
path: root/src/bin/scripts/reindexdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts/reindexdb.c')
-rw-r--r--src/bin/scripts/reindexdb.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c
index 40dcbc92833..1efb53110ef 100644
--- a/src/bin/scripts/reindexdb.c
+++ b/src/bin/scripts/reindexdb.c
@@ -614,16 +614,16 @@ get_parallel_object_list(PGconn *conn, ReindexType type,
{
case REINDEX_DATABASE:
Assert(user_list == NULL);
- appendPQExpBuffer(&catalog_query,
- "SELECT c.relname, ns.nspname\n"
- " FROM pg_catalog.pg_class c\n"
- " JOIN pg_catalog.pg_namespace ns"
- " ON c.relnamespace = ns.oid\n"
- " WHERE ns.nspname != 'pg_catalog'\n"
- " AND c.relkind IN ("
- CppAsString2(RELKIND_RELATION) ", "
- CppAsString2(RELKIND_MATVIEW) ")\n"
- " ORDER BY c.relpages DESC;");
+ appendPQExpBufferStr(&catalog_query,
+ "SELECT c.relname, ns.nspname\n"
+ " FROM pg_catalog.pg_class c\n"
+ " JOIN pg_catalog.pg_namespace ns"
+ " ON c.relnamespace = ns.oid\n"
+ " WHERE ns.nspname != 'pg_catalog'\n"
+ " AND c.relkind IN ("
+ CppAsString2(RELKIND_RELATION) ", "
+ CppAsString2(RELKIND_MATVIEW) ")\n"
+ " ORDER BY c.relpages DESC;");
break;
case REINDEX_SCHEMA:
@@ -637,30 +637,30 @@ get_parallel_object_list(PGconn *conn, ReindexType type,
* All the tables from all the listed schemas are grabbed at
* once.
*/
- appendPQExpBuffer(&catalog_query,
- "SELECT c.relname, ns.nspname\n"
- " FROM pg_catalog.pg_class c\n"
- " JOIN pg_catalog.pg_namespace ns"
- " ON c.relnamespace = ns.oid\n"
- " WHERE c.relkind IN ("
- CppAsString2(RELKIND_RELATION) ", "
- CppAsString2(RELKIND_MATVIEW) ")\n"
- " AND ns.nspname IN (");
+ appendPQExpBufferStr(&catalog_query,
+ "SELECT c.relname, ns.nspname\n"
+ " FROM pg_catalog.pg_class c\n"
+ " JOIN pg_catalog.pg_namespace ns"
+ " ON c.relnamespace = ns.oid\n"
+ " WHERE c.relkind IN ("
+ CppAsString2(RELKIND_RELATION) ", "
+ CppAsString2(RELKIND_MATVIEW) ")\n"
+ " AND ns.nspname IN (");
for (cell = user_list->head; cell; cell = cell->next)
{
const char *nspname = cell->val;
if (nsp_listed)
- appendPQExpBuffer(&catalog_query, ", ");
+ appendPQExpBufferStr(&catalog_query, ", ");
else
nsp_listed = true;
appendStringLiteralConn(&catalog_query, nspname, conn);
}
- appendPQExpBuffer(&catalog_query, ")\n"
- " ORDER BY c.relpages DESC;");
+ appendPQExpBufferStr(&catalog_query, ")\n"
+ " ORDER BY c.relpages DESC;");
}
break;