Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)

Lists: pgsql-hackers
From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-06 18:59:39
Message-ID: 4F565E9B.2090008@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I've noticed a locale-specific bug in regression tests, I discovered
thanks to the new "magpie" buildfarm member (testing "cs_CZ" locale).
The problem is in "foreign_data" where the output is sorted by a column,
and "cs_CZ" behaves differently from "C" and "en_US".

More precisely, in "C" it's true that ('s4' < 'sc') but that's not true
in cs_CZ (and supposedly some other locales).

I've fixed this by replacing 'sc' with 't0' which seems to fix the
ordering (and should work with other locales too). See the patch attached.

kind regards
Tomas

Attachment Content-Type Size
regression-foreign-data.diff text/plain 5.8 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-07 16:56:33
Message-ID: CA+TgmoaRcf7m8Nm+26PM9+BuuZQq9vVEWbgtbHow+e2BHHFOkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 6, 2012 at 1:59 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> I've noticed a locale-specific bug in regression tests, I discovered
> thanks to the new "magpie" buildfarm member (testing "cs_CZ" locale).
> The problem is in "foreign_data" where the output is sorted by a column,
> and "cs_CZ" behaves differently from "C" and "en_US".
>
> More precisely, in "C" it's true that ('s4' < 'sc') but that's not true
> in cs_CZ (and supposedly some other locales).
>
> I've fixed this by replacing 'sc' with 't0' which seems to fix the
> ordering (and should work with other locales too). See the patch attached.

This was fixed on master in commit
3e9a2672d25aed15ae6b4a09decbd8927d069868, but that picked the name s0
rather than t0. I suggest we make the same naming decision in the
back-branch to avoid future confusion...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-07 20:08:41
Message-ID: 4F57C049.3070908@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 7.3.2012 17:56, Robert Haas wrote:
> On Tue, Mar 6, 2012 at 1:59 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>> I've noticed a locale-specific bug in regression tests, I discovered
>> thanks to the new "magpie" buildfarm member (testing "cs_CZ" locale).
>> The problem is in "foreign_data" where the output is sorted by a column,
>> and "cs_CZ" behaves differently from "C" and "en_US".
>>
>> More precisely, in "C" it's true that ('s4' < 'sc') but that's not true
>> in cs_CZ (and supposedly some other locales).
>>
>> I've fixed this by replacing 'sc' with 't0' which seems to fix the
>> ordering (and should work with other locales too). See the patch attached.
>
> This was fixed on master in commit
> 3e9a2672d25aed15ae6b4a09decbd8927d069868, but that picked the name s0
> rather than t0. I suggest we make the same naming decision in the
> back-branch to avoid future confusion...

Yes, that's a better solution - I haven't noticed that commit. Should I
prepare a modified patch or is it possible to apply the fix from master
to this branch?

Tomas


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-07 20:39:23
Message-ID: CA+Tgmobw4JNDe7dU+r=DANo8CaqTtBoMUD1mhqJ7yY1VxLUoeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 7, 2012 at 3:08 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> On 7.3.2012 17:56, Robert Haas wrote:
>> On Tue, Mar 6, 2012 at 1:59 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>>> I've noticed a locale-specific bug in regression tests, I discovered
>>> thanks to the new "magpie" buildfarm member (testing "cs_CZ" locale).
>>> The problem is in "foreign_data" where the output is sorted by a column,
>>> and "cs_CZ" behaves differently from "C" and "en_US".
>>>
>>> More precisely, in "C" it's true that ('s4' < 'sc') but that's not true
>>> in cs_CZ (and supposedly some other locales).
>>>
>>> I've fixed this by replacing 'sc' with 't0' which seems to fix the
>>> ordering (and should work with other locales too). See the patch attached.
>>
>> This was fixed on master in commit
>> 3e9a2672d25aed15ae6b4a09decbd8927d069868, but that picked the name s0
>> rather than t0.  I suggest we make the same naming decision in the
>> back-branch to avoid future confusion...
>
> Yes, that's a better solution - I haven't noticed that commit. Should I
> prepare a modified patch or is it possible to apply the fix from master
> to this branch?

I tried to cherry-pick it, but there were conflicts, so I guess
someone will need to go through and adjust. It's probably only 10
minutes work, but if you don't mind doing it, I'd be grateful.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-07 21:02:43
Message-ID: 4F57CCF3.4040109@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 7.3.2012 21:39, Robert Haas wrote:
> On Wed, Mar 7, 2012 at 3:08 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>> On 7.3.2012 17:56, Robert Haas wrote:
>>> On Tue, Mar 6, 2012 at 1:59 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>>>> I've noticed a locale-specific bug in regression tests, I discovered
>>>> thanks to the new "magpie" buildfarm member (testing "cs_CZ" locale).
>>>> The problem is in "foreign_data" where the output is sorted by a column,
>>>> and "cs_CZ" behaves differently from "C" and "en_US".
>>>>
>>>> More precisely, in "C" it's true that ('s4' < 'sc') but that's not true
>>>> in cs_CZ (and supposedly some other locales).
>>>>
>>>> I've fixed this by replacing 'sc' with 't0' which seems to fix the
>>>> ordering (and should work with other locales too). See the patch attached.
>>>
>>> This was fixed on master in commit
>>> 3e9a2672d25aed15ae6b4a09decbd8927d069868, but that picked the name s0
>>> rather than t0. I suggest we make the same naming decision in the
>>> back-branch to avoid future confusion...
>>
>> Yes, that's a better solution - I haven't noticed that commit. Should I
>> prepare a modified patch or is it possible to apply the fix from master
>> to this branch?
>
> I tried to cherry-pick it, but there were conflicts, so I guess
> someone will need to go through and adjust. It's probably only 10
> minutes work, but if you don't mind doing it, I'd be grateful.

Ok, so here's a fixed patch. I haven't used the 3e9a2672 commit
directly, because there seem to be additional changes. I've simply
renamed the 'sc' to 's0' and fixed the differences in output.

Tomas

Attachment Content-Type Size
regression-foreign-data.diff text/plain 6.4 KB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch for a locale-specific bug in regression tests (REL9_1_STABLE)
Date: 2012-03-07 22:20:20
Message-ID: CA+Tgmoa7hn1aX0wv5v64_Wu17vXUE_MY6TikQXBP4Qf37Xb-0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 7, 2012 at 4:02 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> Ok, so here's a fixed patch. I haven't used the 3e9a2672 commit
> directly, because there seem to be additional changes. I've simply
> renamed the 'sc' to 's0' and fixed the differences in output.

Thanks, committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company