Re: Why select * from function doesn't work when function
От
Francisco Figueiredo Jr.
Тема
Re: Why select * from function doesn't work when function
Дата
Msg-id
3F1D966D.8010200@yahoo.com.br
Ответ на
Re: Why select * from function doesn't work when function (Nigel J. Andrews)
Список
Дерево обсуждения
Why select * from function doesn't work when function has return
type void?? "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Re: Why select * from function doesn't work when function "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Why select * from function doesn't work when function "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Re: Why select * from function doesn't work when function "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Why select * from function doesn't work when function "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Re: Why select * from function doesn't work when function "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Why select * from function doesn't work when function "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Re: Why select * from function doesn't work when function Tom Lane <tgl@sss.pgh.pa.us>
Re: Why select * from function doesn't work when function "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Re: Why select * from function doesn't work when function "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Why select * from function doesn't work when function "Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>
Nigel J. Andrews wrote: > > > > Try returning an integer but returning a null for that integer...on the other > hand I see you're using sql as the language and I don't know how that would > work. I tried that and it works. I changed the function body to do a query which returns null. The problem only appears if the return type is void. > > Have you looked at plpgsql? Perhaps that is acceptable for you, in which case: > > create function funcF ( ) returns integer as ' > begin > delete from blah; > return null; > end; > ' as language 'plpgsql'; > > select * from funcF(); > Yeap, it works, but you specified integer as the return type :) I'd like to have the return type as void and be possible to call it with select * from funcF(); Thanks Nigel. -- Regards, Francisco Figueiredo Jr. ------ "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi
В списке pgsql-hackers по дате отправления
От: Nigel J. Andrews
Дата: