Re: BUG #3706: ecpg regression: "MOVE FORWARD"

From: "Bailey, Scott" <scott(dot)bailey(at)eds(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Cc: "Bailey, Scott" <scott(dot)bailey(at)eds(dot)com>
Subject: Re: BUG #3706: ecpg regression: "MOVE FORWARD"
Date: 2007-11-02 19:58:16
Message-ID: D1ED7E020BF706448229140A813566B4016D9BE2@usahm211.amer.corp.eds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I haven't seen any feedback on this report, but FYI... I worked around
this problem by rewriting my code to use a dynamic prepared statement
instead, e.g.

OLD:

EXEC SQL MOVE FORWARD :RowMove IN Sniffer;

NEW:

const char mover[] = "MOVE FORWARD ? IN Sniffer";
[...]
EXEC SQL PREPARE MoverSQL FROM :mover;
[...]
EXEC SQL EXECUTE MoverSQL USING :RowMove;
[...]
EXEC SQL DEALLOCATE PREPARE MoverSQL;

Assuming the new restriction on the original "MOVE FORWARD" is
intentional, it would be nice to see a warning that code changes are
required get into the documentation.

Thanks,
Scott

-----Original Message-----
From: pgsql-bugs-owner(at)postgresql(dot)org
[mailto:pgsql-bugs-owner(at)postgresql(dot)org] On Behalf Of Scott Bailey
Sent: Monday, October 29, 2007 11:45 AM
To: pgsql-bugs(at)postgresql(dot)org
Subject: [BUGS] BUG #3706: ecpg regression: "MOVE FORWARD"

The following bug has been logged online:

Bug reference: 3706
Logged by: Scott Bailey
Email address: scott(dot)bailey(at)eds(dot)com
PostgreSQL version: 8.3beta1
Operating system: Tru64
Description: ecpg regression: "MOVE FORWARD"
Details:

The following statement:

exec sql MOVE FORWARD :RowMove IN Sniffer;

which worked correctly in 8.2.4 and previous versions, now fails to
compile
in 8.3beta1; I receive the following error message:

ERROR: fetch/move count must not be a variable.

This sucks and I couldn't find anything about it in the TODO list or
Release
Notes. Is this unintentional, or should I be recoding my program to use
a
loop to move forward 1 row at a time?

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andreas Pflug 2007-11-02 20:00:59 BUG #3716: utf8 crash with replace
Previous Message Thomas H. 2007-11-02 19:52:43 Re: BUG #3715: StackBuilder failing