Skip site navigation (1) Skip section navigation (2)

Re: ecpg weird behavior

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Nicolas Bazin <nbazin(at)ingenico(dot)com(dot)au>
Cc: Thomas Lockhart <thomas(at)fourpalms(dot)org>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ecpg weird behavior
Date: 2002-03-20 20:19:57
Message-ID: 20020320201957.GE14143@feivel.fam-meskes.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Wed, Mar 20, 2002 at 11:15:14AM +1100, Nicolas Bazin wrote:
> EXEC SQL PREPARE statement FROM :requete;
> EXEC SQL DECLARE curs_cartlstnoire CURSOR FOR statement;
> didn't get preprocessed.

From my current test sources (which will be committed in a few minutes):

sprintf (command, "select * from \"Test\"");

exec sql prepare F from :command;
exec sql declare CUR cursor for F;

strcpy(msg, "open");
exec sql open CUR;

strcpy(msg, "fetch");
exec sql fetch :how_many in CUR into :name, :amount, :letter;
...

Works like a charm with 7.2. I have no idea why yours didn't get preprocessed.

Michael
-- 
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

pgsql-interfaces by date

Next:From: Michael MeskesDate: 2002-03-20 20:59:40
Subject: Re: ecpg weird behavior
Previous:From: Michael MeskesDate: 2002-03-20 20:17:34
Subject: Re: ecpg weird behavior

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group