Re: Notice about costly ri checks - Mailing list pgsql-patches

From Tom Lane
Subject Re: Notice about costly ri checks
Date
Msg-id 12738.1078325919@sss.pgh.pa.us
Whole thread Raw
In response to Notice about costly ri checks  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Notice about costly ri checks
List pgsql-patches
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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Fix usage string for oid2name
Next
From: Fabien COELHO
Date:
Subject: Re: Notice about costly ri checks