Dear patchers, This patch adds a "notice" at constraint creation time if the referential integrity check is to be "costly", that is the comparison operator involves some coercion. The patch also accepts the validation of the regression tests with the added notice. The patch was generated with the "difforig" script against the current cvs head. Thanks in advance for considering it, and for any comment or cheering, -- Fabien Coelho - coelho@cri.ensmp.fr
Fabien COELHO <coelho@cri.ensmp.fr> writes:
> This patch adds a "notice" at constraint creation time if the referential
> integrity check is to be "costly", that is the comparison operator
> involves some coercion.
This is not the correct test at all. The correct test would involve
looking in pg_amop to see if the selected operator is a member of the
opclass for the referenced column's index. (IIRC there are helper
functions in lsyscache.c that will make this easier.)
regards, tom lane
> > This patch adds a "notice" at constraint creation time if the referential > > integrity check is to be "costly", that is the comparison operator > > involves some coercion. > > This is not the correct test at all. You mean my morning 5mn programming will not be enough? ;-) > The correct test would involve > looking in pg_amop to see if the selected operator is a member of the > opclass for the referenced column's index. (IIRC there are helper > functions in lsyscache.c that will make this easier.) Ok, I'll have a look. -- Fabien Coelho - coelho@cri.ensmp.fr
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера