Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)

Поиск
Список
Период
Сортировка
От Clark Evans
Тема Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)
Дата
Msg-id 36EEE7C0.2986D5A0@manhattanproject.com
обсуждение исходный текст
Ответ на RE: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of f rying pan, into fire)  (Michael Davis <michael.davis@prevuenet.com>)
Список pgsql-hackers
Michael Davis wrote:
> Speaking of this, If either LASTNAME or FIRSTNAME is NULL then the result of
> ((LASTNAME || ',' ) || FIRSTNAME) will return NULL.  I would like to be able
> to alter this such that the result will contain what ever is not NULL.  I
> tried to create a C function to overcome this but noticed that if any
> parameter in my C function is NULL then the C function always returns NULL.
> I saw some references in the archives about this issue but was unable to
> determine where it was left.  What is the status of this issue?

Although I feel initial opposition to this idea, on second 
consideration, I guess it is  reasonable behavior, in Oracle, 
the NVL function and the DECODE function both handle NULL 
arguments without having the result be NULL.

However, I'm unaware of any other exceptions in the Oracle
database on this issue.  I believe that user defined functions 
are not allowed to have special NULL treatment -- perhaps 
Oracle has DECODE and NVL hard coded deep in the guts of 
their query processor, while the other functions arn't.

Would a compromise be to add DECODE and NVL ?

Clark


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Davis
Дата:
Сообщение: RE: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of f rying pan, into fire)
Следующее
От: Michael Davis
Дата:
Сообщение: RE: [HACKERS] parser enhancement request for 6.5