Allow CREATE/ALTER DATABASE to manipulate datistemplate and datallowconn.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: fbb1d7d73f8e23a3a61e702629c53cef48cb0918
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-07-02T00:10:38Z
Releases: 9.5.0
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

Files