How can I create null value from function call with no results?
От
Seref Arikan
Тема
How can I create null value from function call with no results?
Дата
Msg-id
CA+4Thdo__L=X4o5hAO8p_9rMgnao93Ah62gQXx9-p4_WxmkGkg@mail.gmail.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? Tom Lane <tgl@sss.pgh.pa.us>
Re: 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? Marc Mamin <M.Mamin@intershop.de>
Re: How can I create null value from function call with no results? David G Johnston <david.g.johnston@gmail.com>
Re: 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? Pavel Stehule <pavel.stehule@gmail.com>
Re: How can I create null value from function call with no results? Seref Arikan <serefarikan@gmail.com>
Greetings,
I want to call a function using a column of a table as the parameter and return the parameter and function results together. create or replace function test_empty_row(p_instance_id integer)
RETURNS TABLE (instance_id_int INTEGER, valstring TEXT)
AS
$$
BEGIN
return query SELECT 0, 'nothing'::text where 1 = 2;
END;
$$ LANGUAGE plpgsql;
select 1,test_empty_row(1); (this is actually "SELECT A.somefield, myfunc(A.somefield) from my_table A" in my code)
when the query in the function returns zero results
В списке pgsql-general по дате отправления
От: Pavel Stehule
Дата: