Re: comparing null value in plpgsql.

Поиск
Список
Период
Сортировка
Искать
От
Тема
Re: comparing null value in plpgsql.
Дата
Msg-id
Pine.LNX.4.20.0203111227000.29061-100000@Larry
Ответ на
Список
Дерево обсуждения
Re: comparing null value in plpgsql. Bhuvan A <bhuvansql@yahoo.com>
Re: comparing null value in plpgsql. Stephan Szabo <sszabo@megazone23.bigpanda.com>
On Mar 10, Stephan Szabo wrote:

> On Mon, 11 Mar 2002, Bhuvan A wrote:
> 
> > here i have a problem in comparing null values in plpgsql. this exist
> > in 7.1.x and 7.2 as well.
> >
> > the condition  !=  fails in plpgsql.
> > consider this function is triggered on every updation on a table.
> >
> >   create function ftest()
> >   returns opaque as 'declare
> >
> >   begin
> >
> >     if new.comp_code != old.comp_code then
> >       ...
> >     end if;
> >     return new;
> >   end;'
> >   language 'plpgsql';
> >
> > this condition fails if old.comp_code is null and new.comp_code has
> > some value.
> 
>  !=  is not true, it's unknown, so the if shouldn't

  what do you mean by  != ?

> fire.  It's a side effect of how the spec defines operations on nulls.
> 

here i mean..

if  != , the loop is not fired. why?
В списке pgsql-bugs по дате отправления
От: Per Winkvist
Дата:
Сообщение: Case sensitive table names ?
От: Mozilla at Marela
Дата:
FAQ