mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
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.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.161 2002/02/18 23:11:14 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.162 2002/02/24 20:20:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2231,6 +2231,8 @@ _copyCreatedbStmt(CreatedbStmt *from)
|
||||
|
||||
if (from->dbname)
|
||||
newnode->dbname = pstrdup(from->dbname);
|
||||
if (from->dbowner)
|
||||
newnode->dbowner = pstrdup(from->dbowner);
|
||||
if (from->dbpath)
|
||||
newnode->dbpath = pstrdup(from->dbpath);
|
||||
if (from->dbtemplate)
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.109 2002/02/18 23:11:14 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.110 2002/02/24 20:20:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1099,6 +1099,8 @@ _equalCreatedbStmt(CreatedbStmt *a, CreatedbStmt *b)
|
||||
{
|
||||
if (!equalstr(a->dbname, b->dbname))
|
||||
return false;
|
||||
if (!equalstr(a->dbowner, b->dbowner))
|
||||
return false;
|
||||
if (!equalstr(a->dbpath, b->dbpath))
|
||||
return false;
|
||||
if (!equalstr(a->dbtemplate, b->dbtemplate))
|
||||
|
Reference in New Issue
Block a user