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-12 14:58:32 |
Message-ID: | 20020912145832.GA32179@feivel.credativ.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 12, 2002 at 09:07:20AM -0400, Tom Lane wrote:
> Michael Meskes <meskes(at)postgresql(dot)org> writes:
> > I'm awfully sorry that I missed this thread. But I do not really
> > understand the problem. If we cannot be exactly as specified why aren't
> > we coming close? As it stands now I have to implement my own
> > PREPARE/EXECUTE in ecpg and the syntax does clash with the backend one.
>
> But you must implement your own PREPARE/EXECUTE anyway, using ecpg
> variables, no? If you can really embed what you need in the backend
> facility, and only the syntax variation is getting in the way, then
> maybe I misunderstand the problem. How do parameters of PREPAREd
> statements work in ecpg?
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;
This binds the ident STMT to the statement in string. Later you can then
declare a cursor using
exec sql declare CURS cursor for STMT;
or execute the statement using
exec sql execute STMT;
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.
I'm not sure where you expect the ecpg variables. If you're talking
about C variables they won't be seen by any statement since ecpg creates
an ascii string of the whole statement before sending it to the backend.
Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Copeland | 2002-09-12 15:19:00 | Re: Schemas not available for pl/pgsql %TYPE.... |
Previous Message | scott.marlowe | 2002-09-12 14:58:26 | Re: PGXLOG variable worthwhile? |