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


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to