Ensure that the 'template1' database should not be visible after pg_upgrade. Fixes #5875

This commit is contained in:
Rahul Shirsat
2020-12-16 11:37:19 +05:30
committed by Akshay Joshi
parent 21333490ef
commit cb0a914099
25 changed files with 148 additions and 29 deletions

View File

@@ -519,7 +519,8 @@ class Connection(BaseConnection):
SELECT
db.oid as did, db.datname, db.datallowconn,
pg_encoding_to_char(db.encoding) AS serverencoding,
has_database_privilege(db.oid, 'CREATE') as cancreate, datlastsysoid
has_database_privilege(db.oid, 'CREATE') as cancreate, datlastsysoid,
datistemplate
FROM
pg_database db
WHERE db.datname = current_database()""")