Hi all, Sorry to ask since I'm pretty sure this kind of question have been asked again an again. But I searched and haven't found my answer.
So here is the question, please help :-) In plpgsql function how do you deal with temporary table. I need do a bunch of data manipulations in my function before returning a ref cursor. The problem is that, as you may know, the temp table aren't drop at the end of the function. And if I try to drop the tables when the cursor is open on it I get errors too. And I need to be able to call the function simultaneously without one interfering with the other. So table created by one instance of the function don't know about tables created by other functions ... I have 4 big selects to construct the data I need... I can't just put all in a big one. So I need a way to store and read data between selects. Thanks for your help!! /David ' LANGUAGE 'plpgsql'; CREATE FUNCTION uk_usp_Comptabilite_AgeDeCompteClient(DATE, VARCHAR, VARCHAR, INTEGER, INTEGER) RETURNS refcursor AS ' DECLARE __________________________________ Do you Yahoo!? All your favorites on one personal page – Try My Yahoo! http://my.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings