create user problem

Started by Vince Vielhaberalmost 25 years ago5 messageshackers
Jump to latest
#1Vince Vielhaber
vev@michvhf.com

According to \h create user I can stipulate NOCREATEDB and NOCREATEUSER
when I create a user. But I get this:

mydb=# create user foo NOCREATEUSER NOCREATEDB in group bar;
ERROR: parser: parse error at or near "NOCREATEDB"
mydb=#

I can create the user by only stipulating one of the NOCREATE items but
not both. Does that mean something's broke or am I misunderstanding
this:

CREATE USER username
[ WITH
[ SYSID uid ]
[ PASSWORD 'password' ] ]
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
[ IN GROUP groupname [, ...] ]
[ VALID UNTIL 'abstime' ]

This line:

[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]

does say I can do both, right?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Vince Vielhaber (#1)
Re: create user problem

Vince Vielhaber <vev@michvhf.com> writes:

mydb=# create user foo NOCREATEUSER NOCREATEDB in group bar;
ERROR: parser: parse error at or near "NOCREATEDB"

This line:
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
does say I can do both, right?

It says you can do both *in that order*.

Feel free to submit a grammar patch to make CREATE USER more flexible
about the ordering of its optional clauses. Right now it's pretty
rigid.

regards, tom lane

#3Vince Vielhaber
vev@michvhf.com
In reply to: Tom Lane (#2)
Re: create user problem

On Wed, 13 Jun 2001, Tom Lane wrote:

Vince Vielhaber <vev@michvhf.com> writes:

mydb=# create user foo NOCREATEUSER NOCREATEDB in group bar;
ERROR: parser: parse error at or near "NOCREATEDB"

This line:
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
does say I can do both, right?

It says you can do both *in that order*.

Feel free to submit a grammar patch to make CREATE USER more flexible
about the ordering of its optional clauses. Right now it's pretty
rigid.

Let me guess, gram.y?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Vince Vielhaber (#3)
Re: create user problem

Vince Vielhaber <vev@michvhf.com> writes:

Feel free to submit a grammar patch to make CREATE USER more flexible
about the ordering of its optional clauses. Right now it's pretty
rigid.

Let me guess, gram.y?

Yup.

regards, tom lane

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: create user problem

Vince Vielhaber <vev@michvhf.com> writes:

mydb=# create user foo NOCREATEUSER NOCREATEDB in group bar;
ERROR: parser: parse error at or near "NOCREATEDB"

This line:
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
does say I can do both, right?

It says you can do both *in that order*.

Feel free to submit a grammar patch to make CREATE USER more flexible
about the ordering of its optional clauses. Right now it's pretty
rigid.

Added to TODO:

* Allow CREATEUSER/CREATEDB ordering in CREATE/ALTER USER

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026