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(int) as select now();'; execute sql; sql := 'execute bla(1);';
executesql; return 'ready';
end
$$ language plpgsql;
test=*# select foo(); foo
-------ready
(1 row)
You should execute strings in plpgsql, not prepared statements.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net=== Schollglas Unternehmensgruppe ===