From 538464f078a149218696dc783465132c8a9dd8c4 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 6 Apr 2017 23:55:06 +0200 Subject: [PATCH] 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. --- src/pgsql/pgsql-schema.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pgsql/pgsql-schema.lisp b/src/pgsql/pgsql-schema.lisp index 9f2aca6..36d98a3 100644 --- a/src/pgsql/pgsql-schema.lisp +++ b/src/pgsql/pgsql-schema.lisp @@ -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