In pg_upgrade, test for datallowconn instead of hardcoding template0.

This commit is contained in:
Bruce Momjian 2010-05-24 19:52:33 +00:00
parent 4b9904a0f8
commit 6368682788
1 changed files with 1 additions and 1 deletions

View File

@ -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");