Re: 7.3beta and ecpg

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: 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-12 19:18:13
Message-ID: 9126.1031858293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgresql(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-12 19:23:01 Re: failed Assert() in utf8_and_iso8859_1.c
Previous Message Tom Lane 2002-09-12 19:12:09 Re: PGXLOG variable worthwhile?