Re: operator does not exist: smallint <> smallint[]

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: operator does not exist: smallint <> smallint[]
Дата
Msg-id
13131.1228829074@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
operator does not exist: smallint <> smallint[] Euler Taveira de Oliveira <euler@timbira.com>
Re: operator does not exist: smallint <> smallint[] Tom Lane <tgl@sss.pgh.pa.us>
Re: operator does not exist: smallint <> smallint[] Euler Taveira de Oliveira <euler@timbira.com>
Re: operator does not exist: smallint <> smallint[] Tom Lane <tgl@sss.pgh.pa.us>
Euler Taveira de Oliveira  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

В списке pgsql-hackers по дате отправления
От: ohp@pyrenet.fr
Дата:
От: Peter Eisentraut
Дата:
FAQ