Re: pgsql: Fix collprovider of predefined collations

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix collprovider of predefined collations
Date: 2017-06-13 15:26:36
Message-ID: 88e4920a-b95d-a458-98d8-9727825249a9@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 6/13/17 10:57, Tom Lane wrote:
> I wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> Fix collprovider of predefined collations
>>> An earlier version of the patch had collprovider as an integer and thus
>>> set these to 0, but the correct setting is now null.
>
>> Surely this is not right. Neither collprovider nor the other fixed-length
>> fields following it in pg_collation are marked nullable, and most of them
>> are accessed as struct fields so that's not an easy thing to change.
>
> Ah, on looking closer, I see what the patch actually changes to null is
> collversion not collprovider. So the patch is ok, the commit message
> not so much.

yup :(

>> The fact that the buildfarm didn't blow up is a bit odd. Maybe we're
>> missing some enforcement somewhere?
>
> As penance for the false alarm, I looked into that angle and indeed we
> didn't have any cross-check against storing NULL from the BKI data into
> a putatively not null column. We do now.

great

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-06-13 15:29:10 pgsql: doc: Fix typo
Previous Message Tom Lane 2017-06-13 14:57:20 Re: pgsql: Fix collprovider of predefined collations