]> granicus.if.org Git - postgresql/commitdiff
In pg_upgrade, test for datallowconn instead of hardcoding template0.
authorBruce Momjian <bruce@momjian.us>
Mon, 24 May 2010 19:52:33 +0000 (19:52 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 24 May 2010 19:52:33 +0000 (19:52 +0000)
contrib/pg_upgrade/info.c

index 756e8ffd8598238dd86197b9f99b7aaa65c4b4d6..19a7b8bda8c00ffc02257ff18c832320534259aa 100644 (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");