Re: Fix optimization of foreign-key on update actions
От | Peter Eisentraut |
---|---|
Тема | Re: Fix optimization of foreign-key on update actions |
Дата | |
Msg-id | c919566d-17ad-7a93-b3f2-7b64afc1297a@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Fix optimization of foreign-key on update actions (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
Список | pgsql-hackers |
On 06/02/2019 12:23, Andrew Gierth wrote: > Two values which are sql-equal but not identical, such as two strings in > a case-insensitive collation that differ only by case, are > distinguishable in some contexts but not others, so what context > actually applies to the quoted rule? > > I think the only reasonable interpretation is that it should use the > same kind of distinctness that is being used by the unique constraint > and the equality comparison that define whether the FK is satisfied. By that logic, a command such as UPDATE t1 SET x = '0' WHERE x = '-0'; could be optimized away as a noop, because in that world there is no construct by which you can prove whether the update happened. I think that would not be satisfactory. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: