Re: Subselects returning array and ANY...

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
Subject: Re: Subselects returning array and ANY...
Date: 2008-02-28 00:11:50
Message-ID: 200802271611.50928.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dawid Kuroczko 2008-02-28 00:34:42 Re: Subselects returning array and ANY...
Previous Message Dawid Kuroczko 2008-02-28 00:01:57 Subselects returning array and ANY...