| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Igor Neyman <ineyman(at)perceptron(dot)com> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: information_schema.referential_constraints broken? |
| Date: | 2012-07-27 16:57:49 |
| Message-ID: | 6821.1343408269@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Igor Neyman <ineyman(at)perceptron(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ing.Edmundo.Robles.Lopez | 2012-07-27 16:59:49 | REINDEX and COPY is wainting since Jun 21! |
| Previous Message | Marek Kielar | 2012-07-27 16:32:18 | Re: Schema-only dump dumps no constraints, no triggers |