From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | jwieck(at)debis(dot)com, djackson(at)cpsgroup(dot)com |
Cc: | jose(at)sferacarta(dot)com, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | RE: [HACKERS] PL/pgSQL a great procedural language for PostgreSQL |
Date: | 1998-11-05 19:50:35 |
Message-ID: | F10BB1FAF801D111829B0060971D839F4D735E@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > It appears that when a function is called if any of the paramaters
> are
> > NULL all of the parameters are NULL.
> > try:
> > drop function nvl(int, int);
> > create function nvl(int, int) returns boolean as '
> > declare
> > nonullo alias as $1;
> > nullo alias as $2;
> > begin
> > return (nonullo IS NULL) AND (nullo IS NULL);
> > end;' language 'plpgsql';
> > select nvl(i,0) from a;
> > you should get:
> > nvl
> > ---
> > t
> > t
> > f
> > t
> > (4 rows)
>
> Don't blame PL/pgSQL for that. There is only one bool isNull
> pointer given to PL handlers. How should the PL handler know,
> which of the arguments are null then? As I said on another
> thread, the function call interface needs to get redesigned.
Well, Jan, don't get sensitive. I love PL/pgSQL. And I had no illusions
that it was your HANDLER causing the problem. I feel that a function
call interface redesign is also needed. But, I do have a quick
question, why does it matter which one is NULL if you can still obtain
the parameters in the order they were passed why would one become NULL
that wasn't before? I'm asking totally from ignorance here.
-DEJ
> Jan
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1998-11-05 20:04:37 | RE: [HACKERS] Re: bug on aggregate function AVG() |
Previous Message | David McDavid | 1998-11-05 18:37:07 | pgaccess disappearing ink |