From: | Igor Neyman <ineyman(at)perceptron(dot)com> |
---|---|
To: | Igor Neyman <ineyman(at)perceptron(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: information_schema.referential_constraints broken? |
Date: | 2012-07-27 14:47:52 |
Message-ID: | A76B25F2823E954C9E45E32FA49D70EC08E7AB04@mail.corp.perceptron.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
Sorry, for the noise.
Igor Neyman
From: Igor Neyman
Sent: Friday, July 27, 2012 9:27 AM
To: pgsql-general(at)postgresql(dot)org
Subject: information_schema.referential_constraints broken?
This query:
select * from information_schema.referential_constraints;
under PG 8.4.5 (Windows platform) produces this error message:
ERROR: operator is not unique: smallint[] <@ smallint[]
LINE 1: select $1 <@ $2 and $2 <@ $1
^
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
QUERY: select $1 <@ $2 and $2 <@ $1
CONTEXT: SQL function "_pg_keysequal" during inlining
********** Error **********
ERROR: operator is not unique: smallint[] <@ smallint[]
SQL state: 42725
Hint: Could not choose a best candidate operator. You might need to add explicit type casts.
Context: SQL function "_pg_keysequal" during inlining
I don't have more recent 8.4 releases to try it on.
It works fine on PG 9.1.3.
Did anyone else experienced this problem?
Regards,
Igor Neyman
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Morgan Lloyd | 2012-07-27 15:17:47 | Re: Terminating a rogue connection |
Previous Message | Ryan Kelly | 2012-07-27 14:27:49 | Re: Switching from OSX to Linux, multi-line queries in \copy don't work anymore |