Re: Busted(?) optimization in ATAddForeignKeyConstraint

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Busted(?) optimization in ATAddForeignKeyConstraint
Дата
Msg-id 72f98297-bd29-cee8-7195-12fa2fc40142@2ndquadrant.com
обсуждение исходный текст
Ответ на Busted(?) optimization in ATAddForeignKeyConstraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Busted(?) optimization in ATAddForeignKeyConstraint
Список pgsql-hackers
On 2020-01-23 23:11, Tom Lane wrote:
> I happened to notice this comment in the logic in
> ATAddForeignKeyConstraint that tries to decide if it can skip
> revalidating a foreign-key constraint after a DDL change:
> 
>               * Since we require that all collations share the same notion of
>               * equality (which they do, because texteq reduces to bitwise
>               * equality), we don't compare collation here.
> 
> Hasn't this been broken by the introduction of nondeterministic
> collations?

I'm not very familiar with the logic in this function, but I think this 
might be okay because the foreign-key equality comparisons are done with 
the collation of the primary key, which doesn't change here AFAICT.

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



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Preserve versions of initdb-created collations in pg_upgrade
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Busted(?) optimization in ATAddForeignKeyConstraint