From a833c441fd3cb92bb9cb169a6e73df8f1c6ffe95 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 24 Feb 2002 20:20:21 +0000 Subject: Add OWNER option to CREATE DATABASE, so superusers can create databases on behalf of unprivileged users. Also, make '=' optional in CREATE DATABASE syntax. From Gavin Sherry, with kibitzing and docs by Tom Lane. --- doc/src/sgml/ref/create_database.sgml | 32 ++++++++++++++++++++++++++------ doc/src/sgml/release.sgml | 3 ++- 2 files changed, 28 insertions(+), 7 deletions(-) (limited to 'doc/src/sgml') diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index b208f100eac..2c87d215914 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -1,5 +1,5 @@ @@ -24,9 +24,10 @@ PostgreSQL documentation CREATE DATABASE name - [ WITH [ LOCATION = 'dbpath' ] - [ TEMPLATE = template ] - [ ENCODING = encoding ] ] + [ WITH [ OWNER [ = ] dbowner ] + [ LOCATION [ = ] 'dbpath' ] + [ TEMPLATE [ = ] template ] + [ ENCODING [ = ] encoding ] ] @@ -47,6 +48,16 @@ CREATE DATABASE name + + dbowner + + + Name of the database user who will own the new database, + or DEFAULT to use the default (namely, the + user executing the command). + + + dbpath @@ -171,7 +182,15 @@ CREATE DATABASE name CREATE DATABASE creates a new PostgreSQL database. - The creator becomes the owner of the new database. + + + + Normally, the creator becomes the owner of the new database. + A different owner may be specified by using the @@ -327,7 +346,8 @@ Type: \copyright for distribution terms There is no CREATE DATABASE statement in SQL92. - Databases are equivalent to catalogs whose creation is implementation-defined. + Databases are equivalent to catalogs, whose creation is + implementation-defined. diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index fae659919de..edcdc9405aa 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,5 +1,5 @@ @@ -26,6 +26,7 @@ worries about funny characters. -- cgit v1.2.3