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

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] User-defined functions with NULL values and sets as parameter and/or return type
Дата
Msg-id 34D92617.78A8BEC3@alumni.caltech.edu
обсуждение исходный текст
Ответ на User-defined functions with NULL values and sets as parameter and/or return type  (Jeroen van Vianen <jeroenv@design.nl>)
Список 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 по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] Error in select
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: new yacc problem