From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: quoting psql varible as identifier |
Date: | 2010-01-05 13:23:08 |
Message-ID: | 162867791001050523vefb2a25oe26631bef7350a3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/1/5 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Mon, Jan 4, 2010 at 2:51 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> I don't have a problem to write second and safe fmtId
>>> function (with technique used in dumputils don't need to modify
>>> libpq), although fmtId do exactly what I need. I would to understand
>>> to behave.
>
>> I think you mean that you would need to understand how it should
>> behave - in which case I agree, but I think Tom spelled that out
>> pretty clearly upthread: close PQescapeStringConn and adapt it to be
>> PQescapeIdentifier.
>
> The more important point here is that fmtId doesn't do "exactly what you
> need" in any case. fmtId is safe to use in pg_dump because pg_dump is
> only expected to work with the same or older version of the backend.
> It would not be safe to use it in libpq, which is expected to still work
> with newer backends that might have more reserved words.
So I finnaly moved to libpq PQescapeIdentConn function
patch is attached.
regards
Pavel
>
> regards, tom lane
>
Attachment | Content-Type | Size |
---|---|---|
variable_escaping.diff | application/octet-stream | 22.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2010-01-05 13:37:06 | Re: Change to config.pl processing in the msvc build environment |
Previous Message | Chetan Suttraway | 2010-01-05 12:49:02 | Re: Thoughts on statistics for continuously advancing columns |