diff options
Diffstat (limited to 'src/bin/scripts/reindexdb.c')
-rw-r--r-- | src/bin/scripts/reindexdb.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index af0738d9334..e736b2baccc 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -512,7 +512,8 @@ run_reindex_command(PGconn *conn, ReindexType type, const char *name, if (tablespace) { - appendPQExpBuffer(&sql, "%sTABLESPACE %s", sep, fmtId(tablespace)); + appendPQExpBuffer(&sql, "%sTABLESPACE %s", sep, + fmtIdEnc(tablespace, PQclientEncoding(conn))); sep = comma; } @@ -552,7 +553,8 @@ run_reindex_command(PGconn *conn, ReindexType type, const char *name, { case REINDEX_DATABASE: case REINDEX_SYSTEM: - appendPQExpBufferStr(&sql, fmtId(name)); + appendPQExpBufferStr(&sql, + fmtIdEnc(name, PQclientEncoding(conn))); break; case REINDEX_INDEX: case REINDEX_TABLE: @@ -775,8 +777,9 @@ get_parallel_object_list(PGconn *conn, ReindexType type, for (i = 0; i < ntups; i++) { appendPQExpBufferStr(&buf, - fmtQualifiedId(PQgetvalue(res, i, 1), - PQgetvalue(res, i, 0))); + fmtQualifiedIdEnc(PQgetvalue(res, i, 1), + PQgetvalue(res, i, 0), + PQclientEncoding(conn))); simple_string_list_append(tables, buf.data); resetPQExpBuffer(&buf); @@ -788,8 +791,9 @@ get_parallel_object_list(PGconn *conn, ReindexType type, * the order of tables list. */ appendPQExpBufferStr(&buf, - fmtQualifiedId(PQgetvalue(res, i, 1), - PQgetvalue(res, i, 2))); + fmtQualifiedIdEnc(PQgetvalue(res, i, 1), + PQgetvalue(res, i, 2), + PQclientEncoding(conn))); simple_string_list_append(user_list, buf.data); resetPQExpBuffer(&buf); |