Re: [PERFORM] cached plans in plpgsql

2005-10-21 Thread Kuba Ouhrabka
Tom, many thanks. Perfect advice as usual... Corrected version attached for the archives. Kuba Tom Lane napsal(a): Kuba Ouhrabka [EMAIL PROTECTED] writes: IF Var_datos.pronargs 0 THEN Var_args := ''; FOR i IN 0..Var_datos.pronargs-1 LOOP SELECT

[PERFORM] cached plans in plpgsql

2005-10-20 Thread Kuba Ouhrabka
Hi, is there an easy way to flush all cached query plans in pl/pgsql functions? I've long running sessions where data are changing and the plans become inaccurate after a while. I can imagine something like recreating all pl/pgsql functions. I can recreate them from sql source files but I'd

Re: [PERFORM] cached plans in plpgsql

2005-10-20 Thread Merlin Moncure
Kuba wrote: is there an easy way to flush all cached query plans in pl/pgsql functions? I've long running sessions where data are changing and the plans become inaccurate after a while. I can imagine something like recreating all pl/pgsql functions. I can recreate them from sql source files

Re: [PERFORM] cached plans in plpgsql

2005-10-20 Thread Kuba Ouhrabka
[howto recreate plpgsql functions] Start here: http://archives.postgresql.org/pgsql-hackers/2005-09/msg00690.php Great, thanks! I slighltly modified the function - it was not working for overloaded functions (same name, different arguments) and for functions with named arguments. Modified

Re: [PERFORM] cached plans in plpgsql

2005-10-20 Thread Tom Lane
Kuba Ouhrabka [EMAIL PROTECTED] writes: IF Var_datos.pronargs 0 THEN Var_args := ''; FOR i IN 0..Var_datos.pronargs-1 LOOP SELECT typname::varchar INTO Var_nameArg FROM pg_type WHERE oid = Var_datos.proargtypes[i]; Var_args