]> granicus.if.org Git - postgresql/commit
Allow CREATE/ALTER DATABASE to manipulate datistemplate and datallowconn.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Jul 2014 00:10:38 +0000 (20:10 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Jul 2014 00:10:38 +0000 (20:10 -0400)
commitfbb1d7d73f8e23a3a61e702629c53cef48cb0918
treeb0f1f20d6dc19568f0916cc33e3aeb7caa263f89
parent15c82efd6994affd1d5654d13bc8911a9faff659
Allow CREATE/ALTER DATABASE to manipulate datistemplate and datallowconn.

Historically these database properties could be manipulated only by
manually updating pg_database, which is error-prone and only possible for
superusers.  But there seems no good reason not to allow database owners to
set them for their databases, so invent CREATE/ALTER DATABASE options to do
that.  Adjust a couple of places that were doing it the hard way to use the
commands instead.

Vik Fearing, reviewed by Pavel Stehule
contrib/pg_upgrade/pg_upgrade.c
doc/src/sgml/ref/alter_database.sgml
doc/src/sgml/ref/create_database.sgml
src/backend/commands/dbcommands.c
src/bin/initdb/initdb.c
src/bin/pg_dump/pg_dumpall.c
src/bin/psql/tab-complete.c