Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 074D92E0055 for ; Wed, 27 Feb 2008 20:08:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63964-05 for ; Wed, 27 Feb 2008 20:08:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by postgresql.org (Postfix) with ESMTP id 562132E004D for ; Wed, 27 Feb 2008 20:08:33 -0400 (AST) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 15578460; Wed, 27 Feb 2008 16:13:21 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: Re: Subselects returning array and ANY... Date: Wed, 27 Feb 2008 16:11:50 -0800 User-Agent: KMail/1.8 Cc: "Dawid Kuroczko" References: <758d5e7f0802271601m592a932bh5916b10eccecbb4a@mail.gmail.com> In-Reply-To: <758d5e7f0802271601m592a932bh5916b10eccecbb4a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802271611.50928.josh@agliodbs.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/228 X-Sequence-Number: 30319 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