I have a plpgsql function which is doing a loop over one table of user data and then inserting that data in various tables. Example:
loop over user table (temp data) insert into users1 table insert into users2 table etc.... end loop Is it faster to use PREPARE for the various INSERT statements inside a plpgsql function? Perhaps I am wrong and it does its PREPARE work when the function is parsed. Collin On 4/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Collin Peters" <[EMAIL PROTECTED]> writes: > Is it possible to have a dynamic PREPARE statement in plpgsql? Well, you could use plpgsql's EXECUTE to run SQL PREPARE and EXECUTE commands, but it seems awfully brute-force. What do you really need to accomplish here? regards, tom lane
---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend