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

From: Clark Evans <clark(dot)evans(at)manhattanproject(dot)com>
To: Michael Davis <michael(dot)davis(at)prevuenet(dot)com>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of frying pan, into fire)
Date: 1999-03-16 23:22:40
Message-ID: 36EEE7C0.2986D5A0@manhattanproject.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Davis 1999-03-16 23:55:04 RE: [HACKERS] parser enhancement request for 6.5
Previous Message Michael Davis 1999-03-16 23:14:33 RE: [HACKERS] Associative Operators? (Was: Re: [NOVICE] Out of f rying pan, into fire)