Re: 7.3beta and ecpg

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 7.3beta and ecpg
Date: 2002-09-13 06:44:30
Message-ID: 20020913064430.GA3926@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2002-09-13 06:53:00 Re: [GENERAL] An opportunity to prove PostgreSQL and our requirement of Case Study info
Previous Message Tatsuo Ishii 2002-09-13 06:41:51 Re: failed Assert() in utf8_and_iso8859_1.c