"Milen Kulev" <[EMAIL PROTECTED]> writes:
> I want to use prepared statement in a function.

Why?  You seem not to be aware that plpgsql implicitly prepares
statements behind the scenes.

>               prepare  mystmt( int, int, varchar)     as insert into part 
> values ($1,$2,$3);
>               execute  mystmt(v_id1, v_id2, v_filler );
>               deallocate mystmt;

If that worked it would be *exactly* the same as just doing

                insert into part values (v_id1, v_id2, v_filler);

except for being slower due to re-preparing each time through the
function.  So don't waste your time trying to outsmart the language.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to