From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: operator does not exist: smallint <> smallint[] |
Date: | 2008-12-09 13:24:34 |
Message-ID: | 13131.1228829074@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Euler Taveira de Oliveira <euler(at)timbira(dot)com> writes:
> I saw a report at .br mailing list [1] complaining about the message's title.
> I do not try to investigate it. Am I missing something?
> euler=# select attname from pg_attribute where attnum > 0 and attnum <>
> ALL(select conkey from pg_constraint where conrelid = attrelid and contype = 'p');
> ERROR: operator does not exist: smallint <> smallint[]
It's entirely right: there's no such operator.
Oh, you wanted a way to write the query correctly? I think what this
person wants might be something like
select attname from pg_attribute where attnum > 0 and not attisdropped
and not exists (select 1 from pg_constraint where attnum = ANY(conkey)
and conrelid = attrelid and contype = 'p');
... although that produces quite a lot of rows, so some additional
constraint is probably wanted too.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2008-12-09 13:40:09 | Re: WIP: default values for function parameters |
Previous Message | ohp | 2008-12-09 13:23:16 | Re: cvs head initdb hangs on unixware |