CREATE DATABASE name
- [ WITH [ OWNER [ = ] dbowner ]
- [ LOCATION [ = ] 'dbpath' ]
- [ TEMPLATE [ = ] template ]
- [ ENCODING [ = ] encoding ] ]
+ [ WITH [ OWNER dbowner ]
+ [ LOCATION 'dbpath' ]
+ [ TEMPLATE template ]
+ [ ENCODING encoding ] ]
Normally, the creator becomes the owner of the new database.
- A different owner may be specified by using the
- clause (but only superusers may create databases on behalf of other users).
- To create a database owned by oneself, either superuser privilege
- or CREATEDB privilege is required. A superuser may create a database
- for another user, even if that user has no special privileges himself.
+ Superusers can create databases owned by other users using the
+
+ users with no special privileges. Non-superusers with CREATEDB
+ privilege can only create databases owned by themselves.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.279 2002/02/24 20:20:20 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.280 2002/02/25 02:53:46 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
}
;
+/*
+ * Optional equals is here only for backward compatibility.
+ * Should be removed someday. bjm 2002-02-24
+ */
opt_equal: '=' { $$ = TRUE; }
| /*EMPTY*/ { $$ = FALSE; }
;