Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 12D1F9F927E for ; Tue, 6 Nov 2007 06:09:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75262-01 for ; Tue, 6 Nov 2007 06:09:13 -0400 (AST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 010FE9F9272 for ; Tue, 6 Nov 2007 06:09:34 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id j3so1088596ugf for ; Tue, 06 Nov 2007 02:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=KD5tdo8fLR5A+y9KM3RWHB4JFtnHH0yZOeuozGkVBJw=; b=DhDRhwPqMUIuLLPe/JTbT9OSC0pXQxxw1ASwiRGOd0fVa4nOkYrkTxFXjwRIQDT2xejwGmAWtkPMd/XubvyYsYPazKuAxwpWZTbo8qbhPeD2KKUkFubw3sPfe5Hus9Xs1gW5op9ETjsHaRg5AmwVXyf+FRoGo29y2WzuB2vbFrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Pzhdk8SkC9NSqghoQ6BB28B2mIwoDKYQwS/J8aJAFE6/JJAv1JBYnNFQe5BNeh2VOcinNSAJ/zd/2MWoG69BLigcHQaCKluhw9gUxtty/NN7scUBHpjVbJxBWfdQy3115LQhWn028gdpFOh85UH27htGPYtMqJLBIiCH+CX68uE= Received: by 10.142.245.10 with SMTP id s10mr1422942wfh.1194343770644; Tue, 06 Nov 2007 02:09:30 -0800 (PST) Received: by 10.142.102.2 with HTTP; Tue, 6 Nov 2007 02:09:30 -0800 (PST) Message-ID: <34608c0c0711060209h6056b717x4ce746ab342868c9@mail.gmail.com> Date: Tue, 6 Nov 2007 11:09:30 +0100 From: "=?ISO-8859-1?Q?Ott=F3_Havasv=F6lgyi?=" To: pgsql-sql@postgresql.org Subject: Treating result of subselect as row MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36236_22679726.1194343770620" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/21 X-Sequence-Number: 29549 ------=_Part_36236_22679726.1194343770620 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_36236_22679726.1194343770620 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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
------=_Part_36236_22679726.1194343770620--