Re: 7.3beta and ecpg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 7.3beta and ecpg
Date
Msg-id 9126.1031858293@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.3beta and ecpg  (Michael Meskes <meskes@postgresql.org>)
Responses Re: 7.3beta and ecpg  (Michael Meskes <meskes@postgresql.org>)
List pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> On Thu, Sep 12, 2002 at 09:07:20AM -0400, Tom Lane wrote:
>> But you must implement your own PREPARE/EXECUTE anyway, using ecpg
>> variables, no?

> In ecpg you can use a string variable or constant holding the statement
> to prepare that statement as in 

> exec sql prepare STMT from string;

Sure --- and that is exactly *not* what the backend facility does.  In
the backend PREPARE you supply the statement to be prepared directly in
the same SQL command, not as the value of some variable.

> Now if you have a parameter in the prepared statement by just specify 
> "?" instead some value, you add a using clause during execution to set
> the values. 

And a plain "?" isn't going to fly as the parameter marker, either.
The backend wants to know what datatype each parameter is supposed to
be.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PGXLOG variable worthwhile?
Next
From: Tom Lane
Date:
Subject: Re: failed Assert() in utf8_and_iso8859_1.c