| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Hubert depesz Lubaczewski <depesz(at)depesz(dot)pl> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: psql -F problems |
| Date: | 2003-02-23 19:55:03 |
| Message-ID: | Pine.LNX.4.44.0302231728020.1618-100000@peter.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hubert depesz Lubaczewski writes:
> i belive this kind of information - given from command line - should be
> parsed again in psql itself - just like it is parsed when you enter
> something at psql prompt.
The command line parser inside psql works pretty much like a Unix shell.
That means quoting and escaping is resolved *before* the arguments are
passed to the command. So when you enter
\f '\t'
then the parser resolves this as two tokens: the first is <backslash><f>
and the second is <tab character>. The \f command and ultimately the
routine that sets the field separator have nothing to do with that.
I believe this design is ok, even though it creates apparent
inconsistencies. If you make it behave like you appear to imagine, then
you need to double-escape certain characters in situations where other
users might not expect it.
--
Peter Eisentraut peter_e(at)gmx(dot)net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2003-02-23 20:19:08 | Re: [SQL] 7.3 GROUP BY differs from 7.2 |
| Previous Message | Aspire Something | 2003-02-23 16:22:10 | Date Return must be As per Natural Calander |