Re: IS NULL - Mailing list pgsql-novice

From David Link
Subject Re: IS NULL
Date
Msg-id 3BE86C1B.A14EB99B@soundscan.com
Whole thread Raw
In response to IS NULL  (David Link <dlink@soundscan.com>)
Responses Re: IS NULL
List pgsql-novice
Tom Lane wrote:
>
> David Link <dlink@soundscan.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

pgsql-novice by date:

Previous
From: Jason Earl
Date:
Subject: Re: Workaround or user defined type
Next
From: Tom Lane
Date:
Subject: Re: IS NULL