From: | Michael Paesold <mpaesold(at)gmx(dot)at> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Missing ParameterStatus for backslash_quote |
Date: | 2006-11-27 07:14:40 |
Message-ID: | 456A9060.3080703@gmx.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Michael Paesold <mpaesold(at)gmx(dot)at> writes:
>> Assuming the documentation is correct, this variable is not reported via
>> ParameterStatus messages.
>
> That's intentional. There is no reason for an application to need to
> know about that variable, because there is no reason for it to change
> behavior in consequence. Applications shouldn't be using backslash-quote,
> period -- quote-quote is always correct instead.
FWIW, I am just changing the JDBC driver to use quote-quote instead of
backslash-quote in the cases where the driver does escaping. I think
this should be back-patched to all supported branches.
>> This is a problem for the query parsing code inside the JDBC driver
>> because it needs to know about the state of this variable so that
>> parsing a query in the driver has the same result as in the backend.
>
> I don't see that the JDBC driver needs to know about it either.
> Changing the setting only causes an error to be reported (or not) ---
> it does not affect the meaning of a string. Also, the default setting
> won't affect JDBC because JDBC only uses client_encoding = UTF8. AFAICS
> JDBC can assume that backslash-quote is legal and the backend will
> reject it if not.
You are absolutely right. I was fooled by, e.g. the string constant
'C:\'. With standard_conforming_strings on, this is legal,
backslash-quote is not considered anyways. But without standard
conforming strings, this is illegal anyways, because it should have read
'C:\\'.
So less work for me. :-)
Thanks, Tom.
Best Regards
Michael Paesold
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2006-11-27 07:17:18 | Re: [CORE] RC1 blocker issues |
Previous Message | Marc G. Fournier | 2006-11-27 05:57:14 | Re: [CORE] RC1 blocker issues |