Re: IS NULL

Поиск
Список
Период
Сортировка
От David Link
Тема Re: IS NULL
Дата
Msg-id 3BE86C1B.A14EB99B@soundscan.com
обсуждение исходный текст
Ответ на IS NULL  (David Link <dlink@soundscan.com>)
Ответы Re: IS NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Jason Earl
Дата:
Сообщение: Re: Workaround or user defined type
Следующее
От: Tom Lane
Дата:
Сообщение: Re: IS NULL