Re: CREATE USER bug

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE USER bug
Date: 2003-10-10 17:30:55
Message-ID: 200310101730.h9AHUtP25458@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway wrote:
> On Mon, 2003-10-06 at 16:21, Joshua D. Drake wrote:
> > postgres=# create user with encrypted password '98wq7912a';
> > CREATE USER
> > postgres=# create user with encrypted password '98wq7912a';
> > ERROR: CREATE USER: user name "with" already exists
>
> So, what are we doing about this? If we're considering it a bug, one way
> to fix it is to move WITH from unreserved_keywords to reserved_keywords.
> Any other suggestions?

I think the code is fine as it is now, seeing how WITH is optional:

CREATE USER username [ [ WITH ] option [ ... ] ]

I don't see a huge problem with allowing "with" as a user name. Of
course, we could require them to write:

CREATE USER with WITH ...

but then WITH isn't optional anymore, at least for a user named 'with'.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-10 17:54:25 Re: last beta version to require initdb
Previous Message Dawn M. Wolthuis 2003-10-10 16:13:10 Re: Dreaming About Redesigning SQL