select ARRAY[1, 4, 3] @> ARRAY[3, 1] gives ERROR: operator does not exist: integer[] @> integer[] ???

Started by David Gagnonabout 19 years ago3 messagesgeneral
Jump to latest
#1David Gagnon
david.gagnon@cesart.com

Hi all,

I tried select ARRAY[1,4,3] @> ARRAY[3,1] in pgAdminIII and get an error.
This example comes directly from the postgresql manual section: 9.14. Array
Functions and Operators.

Did I screw up something ? I tried on a 8.1 postgreql and get the same
error.

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

Thanks to point me what I'm doing wrong or how to fix this :-/

Regards

David

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Gagnon (#1)
Re: select ARRAY[1, 4, 3] @> ARRAY[3, 1] gives ERROR: operator does not exist: integer[] @> integer[] ???

"David Gagnon" <david.gagnon@cesart.com> writes:

I tried select ARRAY[1,4,3] @> ARRAY[3,1] in pgAdminIII and get an error.
...
Thanks to point me what I'm doing wrong or how to fix this :-/

Don't use the 8.2 manuals as a guide to an 8.1 or older PG? That
operator is new in 8.2.

regards, tom lane

#3David Gagnon
david.gagnon@cesart.com
In reply to: Tom Lane (#2)
Re: select ARRAY[1, 4, 3] @> ARRAY[3, 1] gives ERROR: operator does not exist: integer[] @> integer[] ???

Dam! my computer rebooted and restarted the old 8.1 postmaster...

Thanks for your help. Sorry for the noise.

Best Regards
David

-----Message d'origine-----
De : Tom Lane [mailto:tgl@sss.pgh.pa.us]
Envoyé : Tuesday, February 27, 2007 11:02 AM
À : David Gagnon
Cc : pgsql-general@postgresql.org
Objet : Re: [GENERAL] select ARRAY[1,4,3] @> ARRAY[3,1] gives ERROR:
operator does not exist: integer[] @> integer[] ???

"David Gagnon" <david.gagnon@cesart.com> writes:

I tried select ARRAY[1,4,3] @> ARRAY[3,1] in pgAdminIII and get an

error.

...
Thanks to point me what I'm doing wrong or how to fix this :-/

Don't use the 8.2 manuals as a guide to an 8.1 or older PG? That
operator is new in 8.2.

regards, tom lane