Treating result of subselect as row

From: Ottó Havasvölgyi <havasvolgyi(dot)otto(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Treating result of subselect as row
Date: 2007-11-06 10:09:30
Message-ID: 34608c0c0711060209h6056b717x4ce746ab342868c9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

If I have a subselect that returns one row, then how can I use this in
expressions that expects row constructors in the operands, like OVERLAPS or
IN ?

SELECT (subselect1) OVEPLAPS (subselect2) -- both subselect returns one
row and two columns

OR:

SELECT (SubselectWithOneRow) IN (subselect2) -- but here subselect2 may
return many rows, but column counts are equal

I tried these in 8.2 without success.

Thanks,
Otto

Browse pgsql-sql by date

  From Date Subject
Next Message Keith Carr 2007-11-06 12:51:45 Bitemporal - problem with correalated subquery?
Previous Message Gregory Stark 2007-11-06 06:58:59 Re: Returning the total number of rows as a separate column when using limit