Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Evan Nelson" <ean5533(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are
Date: 2010-04-19 23:00:50
Message-ID: 8084.1271718050@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>> you'd be required to type something like
>> psql \"nEWuSer\"

> Although we do that with some command-line arguments, like the
> pg_dump -t switch. Not arguing for any particular course here, just
> noting the inconsistency.

Right. -t is like that because it requires parsing anyway: you can type
either -t tablename or -t schema.tablename, and so there has to be some
quoting convention or you couldn't deal with names with embedded dots
(not to mention the possibility of wanting to quote a wildcard
character). In places where a command-line argument is just a name,
though, we've chosen to interpret it literally rather than introduce
quoting issues.

Short answer is that the inconsistencies in this area are intentional.
Ideally it'd be better not to have them, but in practice things are more
convenient with them, because of the conflicts between SQL and shell
quoting conventions.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Abhishek Maurya 2010-04-20 08:14:47 query related to pgsql
Previous Message Bruce Momjian 2010-04-19 21:56:09 Re: Reset ACL to default for pg 8.0