| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Tightening isspace() tests where behavior should match SQL parser |
| Date: | 2017-05-24 19:34:07 |
| Message-ID: | 2848.1495654447@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
>> +1 for back-patching. If I understand correctly, it would change the
>> behavior when you pass a string with non-ASCII leading or trailing
>> whitespace characters to those functions. I suppose that can happen, but
>> it's only pure luck if the current code happens to work in that case.
> Well, it'd work properly for e.g. no-break space in LATINn.
Actually, it's dubious that treating no-break space as whitespace is
correct at all in these use-cases. The core scanner would think it's
an identifier character, so it's not impossible that somebody would
consider it cute to write as part of a SQL identifier. If
the core scanner accepts that, so must these functions.
Hence, applied and back-patched.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Petr Jelinek | 2017-05-24 19:38:56 | Re: ALTER SUBSCRIPTION ..SET PUBLICATION <no name> refresh is not throwing error. |
| Previous Message | Petr Jelinek | 2017-05-24 19:28:39 | Re: ALTER SUBSCRIPTION ..SET PUBLICATION <no name> refresh is not throwing error. |