X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 47E419F9316 for ; Thu, 8 Jun 2006 18:42:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33434-09 for ; Thu, 8 Jun 2006 18:42:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 87C8B9FA4D8 for ; Thu, 8 Jun 2006 18:42:23 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Thu, 8 Jun 2006 21:42:22 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 08 Jun 2006 16:42:22 -0500 Subject: Re: empty set From: Scott Marlowe To: cgg007@yahoo.com Cc: pgsql-sql@postgresql.org In-Reply-To: <20060608214012.96518.qmail@web37907.mail.mud.yahoo.com> References: <20060608214012.96518.qmail@web37907.mail.mud.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1149802941.25526.279.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 08 Jun 2006 16:42:22 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/104 X-Sequence-Number: 25340 On Thu, 2006-06-08 at 16:40, CG wrote: > PostgreSQL 8.1 > > I've been trying to write a SQL prepare routine. One of the challenging > elements I'm running into is an empty set ... > > "select foo from bar where foo in ? ;" > > What if "?" is an set with zero elements? What is the proper value to use to > replace "?" indicating an empty set? NULL?