Re: [HACKERS] User-defined functions with NULL values and sets as parameter and/or return type - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] User-defined functions with NULL values and sets as parameter and/or return type
Date
Msg-id 34D92617.78A8BEC3@alumni.caltech.edu
Whole thread Raw
In response to User-defined functions with NULL values and sets as parameter and/or return type  (Jeroen van Vianen <jeroenv@design.nl>)
List pgsql-hackers
> 1. How do I return a NULL value from a function. In fmgr.c I found out
> that only the C-function with 1 parameter has an additional parameter
> &isNull which might be used to set the return value to a SQL NULL value.
> Why not for functions with more paramaters?

For functions which return a pointer, why not just check for a null
pointer? At the moment, returning a null pointer crashes the backend, but
it would seem to be fairly easy to fix since it sort-of handles null
returns as you found.

I was planning on looking at this someday, but am far away from getting to
it. It's all yours :)

> Please let me know if you have any information that I can use.
> If you want me to elaborate some more on Illustra's API (which is quite
> good on implementing sets except for naming conventions) please let me
> know.

I'd be interested in knowing more about Illustra's features. Since we are
starting with v6.3 testing and bug fixing, you might want to bring this up
again in ~3 weeks to get more of a response...

                                                             - Tom


pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Error in select
Next
From: Bruce Momjian
Date:
Subject: Re: new yacc problem