Re: case statement as inline function? - Mailing list pgsql-general

From Richard Huxton
Subject Re: case statement as inline function?
Date
Msg-id 200403241832.19501.dev@archonet.com
Whole thread Raw
In response to case statement as inline function?  (Mike Nolan <nolan@gw.tssi.com>)
Responses Re: case statement as inline function?
List pgsql-general
On Wednesday 24 March 2004 16:33, Mike Nolan wrote:
>
> Is there any way to treat it like an inline function so that I could write
> something like the following (highly simplified):

I think 7.4 will inline simple SQL functions. Your CASE looks like a good
candidate.

>    select case when A=1 then 1 when B=1 then 2 else null end
>    as mailtype, memname from master
>    where mailtype is not null;

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: "Grace C. Unson"
Date:
Subject: Transaction Isolation Level
Next
From: Shachar Shemesh
Date:
Subject: Re: ole db