From: sad <sad@bankir.ru>
To: Michael Glaesemann <grzm@myrealbox.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: feature request ?
Date: Thu, 24 Jun 2004 08:56:50 +0400
Message-ID: <200406240856.50292.sad@bankir.ru> (raw)
In-Reply-To: <DDFC5701-C59F-11D8-B2C1-000A95C88220@myrealbox.com>
References: <200406231355.50079.sad@bankir.ru>
<200406231012.36791.josh@agliodbs.com>
<DDFC5701-C59F-11D8-B2C1-000A95C88220@myrealbox.com>
On Thursday 24 June 2004 09:32, Michael Glaesemann wrote:
> On Jun 24, 2004, at 2:12 AM, Josh Berkus wrote:
> > Sad,
> >
> >> since BOOL expression has three possible values: TRUE,FALSE,NULL
> >> plpgsql IF control structure should have three alternate blocks:
> >> THEN,ELSE,NULL
> >>
> >> shouldn't it ?
> >
> > No, why?
> >
> > How would you construct a tri-valued IF/THEN? Doesn't seem too
> > likely to
> > me, as well as being different from every other programming language in
> > existance ...
>
> Creating a new control structure to do handle this seems odd. However,
> one could easily have the same effect using a nested if. Using the
> pl/pgsql ELSIF construct, it's pretty straightforward.
>
> IF foo IS NULL
> THEN ...
> ELSIF foo
> THEN ...
> ELSE ...
> END IF;
here the foo expression woll be executed twice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sad@bankir.ru, grzm@myrealbox.com, josh@agliodbs.com
Subject: Re: feature request ?
In-Reply-To: <200406240856.50292.sad@bankir.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox