Re: [GENERAL] Making NULLs visible.

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: herouth(at)oumail(dot)openu(dot)ac(dot)il (Herouth Maoz)
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Making NULLs visible.
Date: 1998-10-13 15:21:38
Message-ID: 199810131521.LAA00885@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> At 18:36 +0200 on 9/10/98, Bruce Momjian wrote:
>
>
> > I am always looking for suggestions on how to display nulls. It is on
> > the TODO list.
>
> Here is my suggestion, admittedly a bit cheeky:
>
> Implement an NVL function - one that dictates a NULL in a field and
> converts it to whatever value is required.
>
> Then, anybody who wants psql to display a null function can decide what is
> to be displayed on a per-query basis:
>
> SELECT a, nvl(b,'I am null!'), c
> FROM tab
> WHERE...
>
> Will give something like:
>
> a | ?column? | c
> ====|============|=====
> 10 | Moses | 100
> 20 | Solomon | 200
> 30 | I am null! | 300
> 40 | David | 400
> 50 | I am null! | 500
>
> And so on... So, if someone wants \N, he'll put '\\N' in the NVL function,
> and if they want NULL, they'll put 'NULL', etc.
>
> NVL will be usefull for lots of stuff... Not only for this...

Yes, this is a nice feature. Ingres has it as isnull(val, 'string'), as
you demonstrated.

I will add it to the TODO list.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John Zhuang 1998-10-13 16:12:49 Two questions, need help soon
Previous Message Constantin Teodorescu 1998-10-13 14:47:07 Compiling errors on RedHat 5.1