From b68e8638afb478d693bac585b7c8038b1b58d352 Mon Sep 17 00:00:00 2001 From: Leonardo Zanivan Date: Mon, 11 Mar 2019 11:06:04 -0300 Subject: [PATCH] Escape table names for --only-indexes --- bin/pg_repack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pg_repack.c b/bin/pg_repack.c index 9002fafb..a68c44a8 100644 --- a/bin/pg_repack.c +++ b/bin/pg_repack.c @@ -2132,7 +2132,7 @@ repack_all_indexes(char *errbuf, size_t errsize) else if (table_list.head || parent_table_list.head) { appendStringInfoString(&sql, - "SELECT repack.oid2text(i.oid), idx.indexrelid, idx.indisvalid, idx.indrelid, $1::text, n.nspname" + "SELECT repack.oid2text(i.oid), idx.indexrelid, idx.indisvalid, idx.indrelid, repack.oid2text(idx.indrelid), n.nspname" " FROM pg_index idx JOIN pg_class i ON i.oid = idx.indexrelid" " JOIN pg_namespace n ON n.oid = i.relnamespace" " WHERE idx.indrelid = $1::regclass ORDER BY indisvalid DESC, i.relname, n.nspname");