Re: [COMMITTERS] pgsql: Fix collprovider of predefined collations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Fix collprovider of predefined collations
Дата
Msg-id 17672.1497365840@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Fix collprovider of predefined collations  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Fix collprovider of predefined collations
Список 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


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: In initdb,defend against assignment of NULL values to not-null
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix collprovider of predefined collations