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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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