CREATEUSER == SUPERUSER? - Mailing list pgsql-patches

From Yoshiyuki Asaba
Subject CREATEUSER == SUPERUSER?
Date
Msg-id 20060110.020420.78728593.y-asaba@sraoss.co.jp
Whole thread Raw
Responses Re: CREATEUSER == SUPERUSER?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Hi,

The following command makes a superuser. Is this correct?

template1=# CREATE USER xyz CREATEUSER;
CREATE ROLE
template1=# select rolname,rolsuper from  pg_roles where rolname = 'xyz';
 rolname | rolsuper
---------+----------
 xyz     | t
(1 row)

I think CREATEUSER keyword is equal to CREATEROLE.

Regards,
--
Yoshiyuki Asaba
y-asaba@sraoss.co.jp
Index: gram.y
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.521
diff -c -r2.521 gram.y
*** gram.y    29 Dec 2005 04:53:18 -0000    2.521
--- gram.y    9 Jan 2006 15:18:51 -0000
***************
*** 664,675 ****
                  }
              | CREATEUSER
                  {
!                     /* For backwards compatibility, synonym for SUPERUSER */
!                     $$ = makeDefElem("superuser", (Node *)makeInteger(TRUE));
                  }
              | NOCREATEUSER
                  {
!                     $$ = makeDefElem("superuser", (Node *)makeInteger(FALSE));
                  }
              | LOGIN_P
                  {
--- 664,675 ----
                  }
              | CREATEUSER
                  {
!                     /* For backwards compatibility, synonym for CREATEROLE */
!                     $$ = makeDefElem("createrole", (Node *)makeInteger(TRUE));
                  }
              | NOCREATEUSER
                  {
!                     $$ = makeDefElem("createrole", (Node *)makeInteger(FALSE));
                  }
              | LOGIN_P
                  {

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: plpgsql: check domain constraints
Next
From: Neil Conway
Date:
Subject: pl/python refcount bug