Re: How can I create null value from function call with no results?

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: How can I create null value from function call with no results?
Дата
Msg-id 1406744789730-5813313.post@n5.nabble.com
обсуждение исходный текст
Ответ на How can I create null value from function call with no results?  (Seref Arikan <serefarikan@gmail.com>)
Ответы Re: How can I create null value from function call with no results?  (Seref Arikan <serefarikan@gmail.com>)
Список pgsql-general
Seref Arikan wrote
> select 1,test_empty_row(1);

SELECT 1, (SELECT test_empty_row(1)) AS func_result

You can also adjust the function to either return the result of the query OR
"RETURN NULL" if no results were found.  i.e., do not use "RETURN QUERY"

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/How-can-I-create-null-value-from-function-call-with-no-results-tp5813311p5813313.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: How can I create null value from function call with no results?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: free RAM not being used for page cache