pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radu-Adrian Popescu <radu.popescu@aldratech.com>
To: pgsql-sql@postgresql.org
Cc: sad@bankir.ru
Subject: Re: feature request ?
Date: Thu, 24 Jun 2004 21:24:57 +0300
Message-ID: <40DB1C79.1000307@aldratech.com> (raw)
In-Reply-To: <20040624174305.GA32506@wolff.to>
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>

Bruno Wolff III wrote:
> 
> There already is a syntax like this. You can do:
> CASE boolean_expression
>   WHEN TRUE THEN whatever
>   WHEN FALSE THEN whatever
>   ELSE whatever
> END
> 

Besides, sad, there's no such thing as a tri-valued boolean.
You either have a boolean(with a true/false value) or a NULL, which is something 
completely different and it's _not_ one of the two _values_ that a boolean 
object takes. I think you're looking at this completely wrong. If in Java you 
receive a Boolean object instance, will you start claiming that that Java has 
tri-valued booleans, and the "if" should account for that ?!

You can think of values in plpgsql as wrapper objects that carry a value and 
have a "is_null" flag; I have no idea how they're implemented in PostgreSQL or 
in any RDMBS in general but this should do it, at least for a naive implementation.

Peace,
-- 
Radu-Adrian Popescu
CSA, DBA, Developer
Aldrapay MD
Aldratech Ltd.
+40213212243




view thread (33+ messages)  latest in thread

Message-ID: <40DB1C79.1000307@aldratech.com>
Permalink:  ../40DB1C79.1000307@aldratech.com/
Also on:    postgresql.org/message-id/40DB1C79.1000307@aldratech.com

 · 

reply

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: radu.popescu@aldratech.com, sad@bankir.ru
  Subject: Re: feature request ?
  In-Reply-To: <40DB1C79.1000307@aldratech.com>

* 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