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 5CE1FD1B2BD for ; Thu, 24 Jun 2004 15:41:45 -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 38436-04 for ; Thu, 24 Jun 2004 18:41:45 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 0DEDAD1B21B for ; Thu, 24 Jun 2004 15:41:42 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 0149E35541; Thu, 24 Jun 2004 11:41:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id F3EE1350D5; Thu, 24 Jun 2004 11:41:42 -0700 (PDT) Date: Thu, 24 Jun 2004 11:41:42 -0700 (PDT) From: Stephan Szabo To: Bruno Wolff III Cc: sad , "Gregory S. Williamson" , pgsql-sql@postgresql.org Subject: Re: feature request ? In-Reply-To: <20040624174305.GA32506@wolff.to> Message-ID: <20040624114027.X95843@megazone.bigpanda.com> 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> <20040624174305.GA32506@wolff.to> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/239 X-Sequence-Number: 18184 On Thu, 24 Jun 2004, Bruno Wolff III wrote: > 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 True, but I think that mostly suffers from similar understandability problems. :)