dbTalk Databases Forums  

Re: [SQL] ERROR: operator does not exist: integer = integer[]

mailing.database.pgsql-sql mailing.database.pgsql-sql


Discuss Re: [SQL] ERROR: operator does not exist: integer = integer[] in the mailing.database.pgsql-sql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pavel Stehule
 
Posts: n/a

Default Re: [SQL] ERROR: operator does not exist: integer = integer[] - 04-16-2012 , 09:30 AM






Hello

this is not error, you cannot use predicate IN in this context

use =ANY instead

postgres=> select 10 = ANY(ARRAY[1,2,3]);
?column?
----------
f
(1 row)

postgres=> select 10 = ANY(ARRAY[1,2,3,10]);
?column?
----------
t
(1 row)

Regards

Pavel Stehule


2012/4/11 cesar_cast <cesar.cast.more (AT) gmail (DOT) com>:
Quote:
I have the following

select *
from Â* employee AS e
where Â*(e.id) IN Â*(ARRAY[3,1]);

I have the following mistake
ERROR: Â*operator does not exist: integer = integer[]
LINE 3: where Â*(e.id) IN Â*(ARRAY[3,1]);
Â* Â* Â* Â* Â* Â* Â* Â* Â* Â* Â*^
HINT: Â*No operator matches the given name and argument type(s). You might
need to add explicit type casts.

********** Error **********

ERROR: operator does not exist: integer = integer[]
SQL state: 42883
Hint: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
Character: 45


Can anybody explain me?


--
View this message in context: http://postgresql.1045698.n5.nabble....9p5634039.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
--
Sent via pgsql-sql mailing list (pgsql-sql (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.