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
Showing
- contrib/pg_upgrade/pg_upgrade.c 4 additions, 6 deletionscontrib/pg_upgrade/pg_upgrade.c
- doc/src/sgml/ref/alter_database.sgml 22 additions, 0 deletionsdoc/src/sgml/ref/alter_database.sgml
- doc/src/sgml/ref/create_database.sgml 24 additions, 0 deletionsdoc/src/sgml/ref/create_database.sgml
- src/backend/commands/dbcommands.c 77 additions, 9 deletionssrc/backend/commands/dbcommands.c
- src/bin/initdb/initdb.c 1 addition, 5 deletionssrc/bin/initdb/initdb.c
- src/bin/pg_dump/pg_dumpall.c 3 additions, 7 deletionssrc/bin/pg_dump/pg_dumpall.c
- src/bin/psql/tab-complete.c 4 additions, 3 deletionssrc/bin/psql/tab-complete.c
Loading
Please register or sign in to comment