From: Bruce Momjian Date: Mon, 24 May 2010 19:52:33 +0000 (+0000) Subject: In pg_upgrade, test for datallowconn instead of hardcoding template0. X-Git-Tag: REL9_0_BETA2~78 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=6368682788b95e76db7e8f44e62eae53b20b783a;p=users%2Fkgrittn%2Fpostgres.git In pg_upgrade, test for datallowconn instead of hardcoding template0. --- diff --git a/contrib/pg_upgrade/info.c b/contrib/pg_upgrade/info.c index 756e8ffd85..19a7b8bda8 100644 --- a/contrib/pg_upgrade/info.c +++ b/contrib/pg_upgrade/info.c @@ -228,7 +228,7 @@ get_db_infos(migratorContext *ctx, DbInfoArr *dbinfs_arr, Cluster whichCluster) "FROM pg_catalog.pg_database d " " LEFT OUTER JOIN pg_catalog.pg_tablespace t " " ON d.dattablespace = t.oid " - "WHERE d.datname != 'template0'"); + "WHERE d.datallowconn = true"); i_datname = PQfnumber(res, "datname"); i_oid = PQfnumber(res, "oid");