postgres.git / summary / log / commit / refs
commit 484b3e1d83eefffa3953ff6bfea72dbe547916b5
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Fri Sep 18 19:14:09 2026 +0000
Remove unused columns from pg_upgrade's query
Commit 9637badd9f removed the use of these collation-related fields in
the result set, moving that to a different query, but forgot to remove
the columns from the query.
src/bin/pg_upgrade/info.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 37fff93892f..5c59cfb32e8 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -401,23 +401,13 @@ get_db_infos(ClusterInfo *cluster)
int ntups;
int tupnum;
DbInfo *dbinfos;
- int i_datname,
- i_oid,
+ int i_oid,
+ i_datname,
i_spclocation;
char query[QUERY_ALLOC];
snprintf(query, sizeof(query),
- "SELECT d.oid, d.datname, d.encoding, d.datcollate, d.datctype, ");
- if (GET_MAJOR_VERSION(cluster->major_version) >= 1700)
- snprintf(query + strlen(query), sizeof(query) - strlen(query),
- "datlocprovider, datlocale, ");
- else if (GET_MAJOR_VERSION(cluster->major_version) >= 1500)
- snprintf(query + strlen(query), sizeof(query) - strlen(query),
- "datlocprovider, daticulocale AS datlocale, ");
- else
- snprintf(query + strlen(query), sizeof(query) - strlen(query),
- "'c' AS datlocprovider, NULL AS datlocale, ");
- snprintf(query + strlen(query), sizeof(query) - strlen(query),
+ "SELECT d.oid, d.datname, "
"pg_catalog.pg_tablespace_location(t.oid) AS spclocation "
"FROM pg_catalog.pg_database d "
" LEFT OUTER JOIN pg_catalog.pg_tablespace t "