Re: IS NULL

From: David Link <dlink(at)soundscan(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: IS NULL
Date: 2001-11-06 23:02:51
Message-ID: 3BE86C1B.A14EB99B@soundscan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
>
> David Link <dlink(at)soundscan(dot)com> writes:
> > This frag returns a bogus date when column value is null:
> > to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY')
>
> Uh, what's bogus about it? I get a NULL result.

The data in my column was bogus and not of the form 'DDMMYYYY'. Sorry
Tom, my mistake. Actually, it was of the form YYYY and it was causing
the query to blow up with:

psql:show_title.sql:13: pqReadData() -- backend closed the channel
unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
psql:show_title.sql:13: connection to server was lost

>
> > So I'm looking for something of this sort:
> > (case when not is null (t.theatre_reldate) then
>
> It's spelled "something IS NULL" or "something IS NOT NULL".
>

Thanks, I had trouble finding this in the on-line manuals. I couldn't
find it in Chapter 4 of the User Guide, Functions and Operators.

-David

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-11-06 23:41:15 Re: IS NULL
Previous Message Jason Earl 2001-11-06 20:41:03 Re: Workaround or user defined type