diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index 91cf7018c0818a44135492ce8d03eb522422e653..5158854841f4daf1afb051cb2306fba3dafad2a0 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -46,14 +46,6 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> See <xref linkend="SQL-CREATEUSER">. </para> - <para> - Normally, the creator becomes the owner of the new database. - Superusers can create databases owned by other users, by using the - <literal>OWNER</> clause. They can even create databases owned by - users with no special privileges. Non-superusers with <literal>CREATEDB</> - privilege can only create databases owned by themselves. - </para> - <para> By default, the new database will be created by cloning the standard system database <literal>template1</>. A different template can be @@ -84,9 +76,11 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> <term><replaceable class="parameter">user_name</replaceable></term> <listitem> <para> - The name of the database user who will own the new database, + The role name of the user who will own the new database, or <literal>DEFAULT</literal> to use the default (namely, the - user executing the command). + user executing the command). To create a database owned by another + role, you must be a direct or indirect member of that role, + or be a superuser. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/create_schema.sgml b/doc/src/sgml/ref/create_schema.sgml index 2602bb1d56f98562b571ae240620b549728d2b84..550acf1a535a8c8f776459befac61a7988e06aa1 100644 --- a/doc/src/sgml/ref/create_schema.sgml +++ b/doc/src/sgml/ref/create_schema.sgml @@ -67,7 +67,8 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">user_na <term><replaceable class="parameter">schema_name</replaceable></term> <listitem> <para> - The name of a schema to be created. If this is omitted, the user name + The name of a schema to be created. If this is omitted, the + <replaceable class="parameter">user_name</replaceable> is used as the schema name. The name cannot begin with <literal>pg_</literal>, as such names are reserved for system schemas. @@ -79,9 +80,10 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">user_na <term><replaceable class="parameter">user_name</replaceable></term> <listitem> <para> - The name of the user who will own the schema. If omitted, - defaults to the user executing the command. Only superusers - can create schemas owned by users other than themselves. + The role name of the user who will own the new schema. If omitted, + defaults to the user executing the command. To create a schema + owned by another role, you must be a direct or indirect member of + that role, or be a superuser. </para> </listitem> </varlistentry> @@ -197,7 +199,8 @@ CREATE VIEW hollywood.winners AS all objects within it. <productname>PostgreSQL</productname> allows schemas to contain objects owned by users other than the schema owner. This can happen only if the schema owner grants the - <literal>CREATE</> privilege on his schema to someone else. + <literal>CREATE</> privilege on his schema to someone else, or a + superuser chooses to create objects in it. </para> <para>