X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E3D87D1B751 for ; Thu, 24 Jun 2004 14:36:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01156-07 for ; Thu, 24 Jun 2004 17:36:45 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 87491D1B745 for ; Thu, 24 Jun 2004 14:36:43 -0300 (ADT) Received: (qmail 505 invoked by uid 500); 24 Jun 2004 17:43:05 -0000 Date: Thu, 24 Jun 2004 12:43:05 -0500 From: Bruno Wolff III To: Stephan Szabo Cc: sad , "Gregory S. Williamson" , pgsql-sql@postgresql.org Subject: Re: feature request ? Message-ID: <20040624174305.GA32506@wolff.to> Mail-Followup-To: Stephan Szabo , sad , "Gregory S. Williamson" , pgsql-sql@postgresql.org References: <71E37EF6B7DCC1499CEA0316A256832801057B7C@loki.wc.globexplorer.net> <200406241655.26065.sad@bankir.ru> <20040624065015.Y87012@megazone.bigpanda.com> <200406241724.14810.sad@bankir.ru> <20040624072023.H88508@megazone.bigpanda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040624072023.H88508@megazone.bigpanda.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/237 X-Sequence-Number: 18182 On Thu, Jun 24, 2004 at 07:34:18 -0700, Stephan Szabo wrote: > > I was thinking that something like Cs switch might work. There's still a > question of the keywords because I don't like reusing case, but maybe > something of the general form: > case foo > is true > is false > is null There already is a syntax like this. You can do: CASE boolean_expression WHEN TRUE THEN whatever WHEN FALSE THEN whatever ELSE whatever END