From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Cc: Dawid Kuroczko <qnex42@gmail.com>
Subject: Re: Subselects returning array and ANY...
Date: Wed, 27 Feb 2008 16:11:50 -0800
Message-ID: <200802271611.50928.josh@agliodbs.com> (raw)
In-Reply-To: <758d5e7f0802271601m592a932bh5916b10eccecbb4a@mail.gmail.com>
References: <758d5e7f0802271601m592a932bh5916b10eccecbb4a@mail.gmail.com>
Dawid,
> SELECT * FROM foo WHERE t = ANY (SELECT '{x4,5,zzz}'::text[]);
> ERROR: operator does not exist: text = text[]
> HINT: No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
Drop the second SELECT, I think.
postgres=# select 'x' = ANY ( '{x,y,z}'::TEXT[] );
?column?
----------
t
--
--Josh
Josh Berkus
PostgreSQL @ Sun
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, qnex42@gmail.com
Subject: Re: Subselects returning array and ANY...
In-Reply-To: <200802271611.50928.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox