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

From Michael Meskes
Subject Re: 7.3beta and ecpg
Date
Msg-id 20020913064430.GA3926@feivel.credativ.de
Whole thread Raw
In response to Re: 7.3beta and ecpg  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Sep 12, 2002 at 03:18:13PM -0400, Tom Lane wrote:
> 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.

The variable will be replaced by ecpg. That's not a problem. The actual
ecpg prepare function does insert the value of the variable when storing
the so-called prepared statement, which of course is not prepared in
reality.

> > 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.

So, yes, this may be a problem we have to think about. But I could
handle that by asking the backend for the datatypes before issuing the
PREPARE statement and thus formulating it accordingly. 

Anyway, we could of course keep both ways seperate, but right now that
would mean I have to disable access to the backend functions in ecpg or
else the parser will be in trouble or else the parser will be in trouble. And frankly I don't really like that.

Michael

-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: failed Assert() in utf8_and_iso8859_1.c
Next
From: Jeff Davis
Date:
Subject: Re: