Re: Busted(?) optimization in ATAddForeignKeyConstraint

2020-01-24 Thread Tom Lane
Peter Eisentraut writes: > 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 th

Re: Busted(?) optimization in ATAddForeignKeyConstraint

2020-01-24 Thread Peter Eisentraut
On 2020-01-24 01:21, Thomas Munro wrote: On Fri, Jan 24, 2020 at 11:12 AM 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 t

Re: Busted(?) optimization in ATAddForeignKeyConstraint

2020-01-24 Thread Peter Eisentraut
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

Re: Busted(?) optimization in ATAddForeignKeyConstraint

2020-01-23 Thread Thomas Munro
On Fri, Jan 24, 2020 at 11:12 AM 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 no

Busted(?) optimization in ATAddForeignKeyConstraint

2020-01-23 Thread Tom Lane
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 tex