Peter Bex <peter....@xs4all.nl> writes:
> But when I try to do the same but pas the 2 as a parameter,
> (I do "EXECUTE bar($1)" with $1 bound to "2"), I get an error:

Why would you do that, rather than executing the prepared statement
directly with PQexecPrepared?  Interposing an EXECUTE doesn't do
anything but add parsing overhead.

The reason this particular case doesn't work is that utility statements
(including EXECUTE) don't have any support for $n parameters.

                        regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to