Avoid operator is not unique errors.

When the intarray extension is installed our PostgreSQL catalog query fails
because we now have more than one operator solving smallint[] <@ smallint[].
It is easy to avoid that problem by casting to integer[], smallint being an
implementation detail here anyway.

Fix #532.
This commit is contained in:
Dimitri Fontaine 2017-04-06 23:55:06 +02:00
parent 0219f55071
commit 538464f078

View File

@ -265,11 +265,13 @@ order by n.nspname, r.relname"
pg_catalog.pg_get_constraintdef(r.oid, true) as condef,
(select string_agg(attname, ',')
from pg_attribute
where attrelid = r.conrelid and array[attnum] <@ conkey
where attrelid = r.conrelid
and array[attnum::integer] <@ conkey::integer[]
) as conkey,
(select string_agg(attname, ',')
from pg_attribute
where attrelid = r.confrelid and array[attnum] <@ confkey
where attrelid = r.confrelid
and array[attnum::integer] <@ confkey::integer[]
) as confkey,
confupdtype, confdeltype, confmatchtype,
condeferrable, condeferred