From: | Russell Smith <mr-russ(at)pws(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: pg_dump case folding bug |
Date: | 2004-11-13 10:47:50 |
Message-ID: | 200411132147.51136.mr-russ@pws.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
On Sat, 13 Nov 2004 04:05 pm, Tom Lane wrote:
> Russell Smith <mr-russ(at)pws(dot)com(dot)au> writes:
> > pg_dump does not fold case, and quote table and schema names correctly.
>
> This is not a bug; it is a behavior we deliberately adopted years ago,
> after unsuccessful experiments with behavior like what you propose.
>
> The rule is that names appearing on a shell command line are taken
> literally, without dequoting or case folding. Yes, this is inconsistent
> with the behavior if the same string were entered within an SQL context,
> but then again the command line isn't an SQL context.
>
> The main reason for this position is that the shell imposes its own
> quoting rules that we can't avoid, and these rules are not very
> compatible with the SQL identifier quoting rules. Do you *really*
> want to have to type '"Test"' when you could just write Test ?
>
> Even more to the point, the only argument in favor of adding code to do
> it like this is to try to make the shell command line context just like
> the SQL context, but *you can't make it so*. If you could make "Test"
> on the command line work just like "Test" in SQL it'd be great ... but
> you can't because the shell will strip the double quotes before you ever
> see them.
>
> We went around a few times on this, but eventually decided it was
> unhelpful to try to emulate the SQL quoting behavior.
>
Thanks Tom, I found this out after talking to the pg_dump developers.
I had discussed with Neil if this should be implement and proposed I
have a go at it. I have since seen otherwise and identified the bug
in phppgadmin causing the problem.
Thanks for the detailed answer.
> BTW, this behavior is consistent across all our command-line tools;
> if we did want to change it it'd affect much more than just pg_dump.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Stefanos Harhalakis | 2004-11-13 11:47:26 | Bogus error message about private key (not a bug). |
Previous Message | Tom Lane | 2004-11-13 05:05:12 | Re: pg_dump case folding bug |
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Sherry | 2004-11-13 12:31:34 | Developer's FAQ update |
Previous Message | Gavin Sherry | 2004-11-13 08:57:00 | Re: Give the TODO list a little more verbose explanation |