pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Dawid Kuroczko <qnex42@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Subselects returning array and ANY...
Date: Wed, 27 Feb 2008 16:45:21 -0800
Message-ID: <200802271645.22055.josh@agliodbs.com> (raw)
In-Reply-To: <758d5e7f0802271634q7d8bbdc0t29cb94e932526f22@mail.gmail.com>
References: <758d5e7f0802271601m592a932bh5916b10eccecbb4a@mail.gmail.com>
	<200802271611.50928.josh@agliodbs.com>
	<758d5e7f0802271634q7d8bbdc0t29cb94e932526f22@mail.gmail.com>

Dawid,

> But you are right, though!  I just need to leave off the subselect! 
> Thanks! SELECT h.* FROM haystack h JOIN needles ON straw = ANY (straws);
>
> (not exactly what I was looking for, but it works ;))

Yeah, the problem with your first query is that it's returning a rowset of 
arrays, not a single array.  This means that ANY() doesn't know exactly 
what to do with it.

-- 
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco



view thread (4+ messages)

Message-ID: <200802271645.22055.josh@agliodbs.com>
Permalink:  ../200802271645.22055.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200802271645.22055.josh@agliodbs.com

 · 

reply

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: <200802271645.22055.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