-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane
Sent: Wednesday, June 14, 2006 4:35 PM
To: Milen Kulev
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Prepared statements in PGSQL functions
"Milen Kulev" <[EMAIL PROTECTED]> w
"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);
>
am 14.06.2006, um 15:12:36 +0200 mailte Milen Kulev folgendes:
> How to solve my problem ? Is it possible at all to call prepared statement
> inside a function at all?
Yes, i have a example:
create or replace function foo() returns text as $$
declare sql text;
begin
sql := 'prepare bla(
Hi Listers,
I want to use prepared statement in a function. Here is my code:
create or replace function generate_data
( integer, integer )
returns integer
as
$BODY$
declare
p_count alias for $1;
p_max_value_id1 alias for $2;