pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix collprovider of predefined collations
4+ messages / 3 participants
[nested] [flat]

* pgsql: Fix collprovider of predefined collations
@ 2017-06-13 12:56  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Peter Eisentraut @ 2017-06-13 12:56 UTC (permalink / raw)
  To: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec7129b7812ce276520f749d0946875663c34093

Modified Files
--------------
src/include/catalog/catversion.h   | 2 +-
src/include/catalog/pg_collation.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Fix collprovider of predefined collations
@ 2017-06-13 13:54  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2017-06-13 13:54 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers

Peter Eisentraut <peter_e@gmx.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.

The fact that the buildfarm didn't blow up is a bit odd.  Maybe we're
missing some enforcement somewhere?

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Fix collprovider of predefined collations
@ 2017-06-13 14:57  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2017-06-13 14:57 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers

I wrote:
> Peter Eisentraut <peter_e@gmx.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.

> 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.

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Fix collprovider of predefined collations
@ 2017-06-13 15:26  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Eisentraut @ 2017-06-13 15:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

On 6/13/17 10:57, Tom Lane wrote:
> I wrote:
>> Peter Eisentraut <peter_e@gmx.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


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-06-13 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13 12:56 pgsql: Fix collprovider of predefined collations Peter Eisentraut <peter_e@gmx.net>
2017-06-13 13:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-13 14:57   ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-13 15:26     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox