Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are
Date
Msg-id 8084.1271718050@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Alvaro Herrera <alvherre@commandprompt.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

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Reset ACL to default for pg 8.0
Next
From: Abhishek Maurya
Date:
Subject: query related to pgsql