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[]
|
Список | pgsql-hackers |
Euler Taveira de Oliveira <euler@timbira.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
В списке pgsql-hackers по дате отправления: