X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id EA69D30E7DC for ; Thu, 12 Jun 2003 14:44:42 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 79623-01 for ; Thu, 12 Jun 2003 11:44:32 -0300 (ADT) Received: from localhost.localdomain (unknown [65.217.53.66]) by svr1.postgresql.org (Postfix) with ESMTP id 6AB2030DC40 for ; Thu, 12 Jun 2003 11:44:31 -0300 (ADT) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h5CFc04i031492; Thu, 12 Jun 2003 11:38:00 -0400 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h5CEiUZ12279; Thu, 12 Jun 2003 10:44:30 -0400 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id MTKBNJ1A; Thu, 12 Jun 2003 10:44:28 -0400 Subject: Re: control structures in plpgsql From: Robert Treat To: Stephan Szabo Cc: pgsql-sql@postgresql.org In-Reply-To: <20030612071842.S25608-100000@megazone23.bigpanda.com> References: <20030612071842.S25608-100000@megazone23.bigpanda.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 12 Jun 2003 10:44:30 -0400 Message-Id: <1055429070.7086.319.camel@camel> Mime-Version: 1.0 X-Archive-Number: 200306/116 X-Sequence-Number: 13874 On Thu, 2003-06-12 at 10:24, Stephan Szabo wrote: > > On 12 Jun 2003, Robert Treat wrote: > > > Does anyone know if there is support for "IF x OR y THEN" syntax in > > plpgsql? The docs just say IF [boolean expression] then. which loosely > > interpreted could allow for an OR, but I couldn't seem to get it to > > work. TIA, > > Can you give a full example of what you're trying? I'm not seeming to > have a problem in 7.3 of saying something with an OR in it apart from > needing to put parentheses around things for ordering in more complicated > cases. > You beat me to my "please disregard the previous email" email ;-) It works (in 7.2 btw), I was just programming in the wrong language inside my plpgsql function. Thanks for taking a look though. -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL