Lists: | Postg토토SQL : Postg토토SQL 메일 링리스트 : 2010-04-28 이후 PGSQL-BUGS 21:20 |
---|
From: | "Kenaniah Cerny" <kenaniah(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #5417: intarray adds <@ operator which breaks infromation_schema.referential_constraints |
Date: | 2010-04-13 08:03:45 |
Message-ID: | 201004130803.o3D83js3014501@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg사설 토토SQL : Postg사설 토토SQL 메일 링리스트 : 2010-04-13 이후 PGSQL-BUGS 08:03 |
The following bug has been logged online:
Bug reference: 5417
Logged by: Kenaniah Cerny
Email address: kenaniah(at)gmail(dot)com
PostgreSQL version: 8.4.2 - 9.0
Operating system: linux
Description: intarray adds <@ operator which breaks
infromation_schema.referential_constraints
Details:
Attempting to select * from information_schema.referential_constraints when
the intarray contrib module is loaded on a database produces the following
result:
>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
It is expected that this is due to intarray defining its own version of the
<@ operator.
Steps to reproduce:
>select * from >information_schema.referential_constraints; --success
>begin;
>\i /usr/local/.../share/contrib/_int.sql;
>select * from information_schema.referential_constraints; --failure
>rollback;
This bug has been verified in versions 8.4.2, 8.4.3, and 9.0-dev and has not
been checked in other versions yet.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Kenaniah Cerny" <kenaniah(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5417: intarray adds <@ operator which breaks infromation_schema.referential_constraints |
Date: | 2010-04-28 21:20:17 |
Message-ID: | 10863.1272489617@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토SQL : Postg토토SQL 메일 링리스트 : 2010-04-28 이후 PGSQL-BUGS 21:20 |
"Kenaniah Cerny" <kenaniah(at)gmail(dot)com> writes:
> Attempting to select * from information_schema.referential_constraints when
> the intarray contrib module is loaded on a database produces the following
> result:
>> ERROR: operator is not unique: smallint[] <@ smallint[]
>> LINE 1: select $1 <@ $2 and $2 <@ $1
Thanks for the report. I've applied a patch for this in HEAD. If you
need to make it work in existing releases, try doing
CREATE OR REPLACE FUNCTION information_schema._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';
as superuser.
regards, tom lane