From: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Strange behaviour with incompatible psql/server |
Date: | 2012-11-28 09:22:34 |
Message-ID: | CABOikdPwBhMpdoYNqJ8KOf0XjRmHqka_wWP1bNyJkog16NePbw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 28, 2012 at 2:28 PM, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com
> wrote:
> On 28.11.2012 10:46, Pavan Deolasee wrote:
>
>> While I'm almost certain that this has something to do with special
>> characters that my naked eyes can not see, all my attempts to spot the
>> difference has failed. So I really have two questions:
>>
>> 1. What's the difference between these files ?
>>
>
> Compare "hexdump -C bad.sql" and "hexdump -C good.sql". There's a UTF-8
> Byte-Order-Mark at the beginning of bad.sql, see
> https://en.wikipedia.org/wiki/**Byte_Order_Mark#UTF-8<https://en.wikipedia.org/wiki/Byte_Order_Mark#UTF-8>
>
>
Thanks.
>
> 2. Why 9.0 psql works fine with that difference, but 8.4 psql does not ?
>>
>
> Dunno, I'll let you investigate that ;-)
>
So seems like this commit did the trick for later releases.
commit 93d3bac5648bddfe195a9cecc45ef0a2da5e85a8
Author: Peter Eisentraut <peter_e(at)gmx(dot)net>
Date: Sat Nov 21 23:59:12 2009 +0000
Ignore UTF-8-encoded Unicode byte-order mark at the beginning of a file
if
the client encoding is UTF-8.
a limited version of a patch proposed by Itagaki Takahiro
Should this not be back patched ? The error that's coming because not
having this fix is rather very strange and hard to debug for any average
individual. I'd almost concluded that one should NEVER use an old psql with
a new server even though the warning that comes is not too glaring.
Thanks,
Pavan
From | Date | Subject | |
---|---|---|---|
Next Message | Pavan Deolasee | 2012-11-28 09:46:23 | Re: Strange behaviour with incompatible psql/server |
Previous Message | Heikki Linnakangas | 2012-11-28 08:58:22 | Re: Strange behaviour with incompatible psql/server |