Re: information_schema.referential_constraints broken? - Mailing list pgsql-general

From Tom Lane
Subject Re: information_schema.referential_constraints broken?
Date
Msg-id 6821.1343408269@sss.pgh.pa.us
Whole thread Raw
In response to Re: information_schema.referential_constraints broken?  (Igor Neyman <ineyman@perceptron.com>)
List pgsql-general
Igor Neyman <ineyman@perceptron.com> writes:
> Answering my own question.
> Replacing original definition of _pg_keysequal (in information_schema):

> CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
>     LANGUAGE sql IMMUTABLE  -- intentionally not STRICT, to allow inlining
>     AS 'select $1 <@ $2 and $2 <@ $1';

> with this one:

> CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
>     LANGUAGE sql IMMUTABLE  -- intentionally not STRICT, to allow inlining
>     AS 'select $1 operator(pg_catalog.<@) $2 and $2 operator(pg_catalog.<@) $1';

> makes queries like:
> select * from information_schema.referential_constraints;
> against information_schema.referential_constraints work without errors.

This is known to happen pre-9.0 if you have contrib/intarray installed.

            regards, tom lane

pgsql-general by date:

Previous
From: Marek Kielar
Date:
Subject: Re: Schema-only dump dumps no constraints, no triggers
Next
From: "Ing.Edmundo.Robles.Lopez"
Date:
Subject: REINDEX and COPY is wainting since Jun 21!