Re: ECPG problem with 8.3 - Mailing list pgsql-general

From Tom Lane
Subject Re: ECPG problem with 8.3
Date
Msg-id 14708.1200326265@sss.pgh.pa.us
Whole thread Raw
In response to Re: ECPG problem with 8.3  (Peter Wilson <petew@yellowhawk.co.uk>)
Responses Re: ECPG problem with 8.3
List pgsql-general
Peter Wilson <petew@yellowhawk.co.uk> writes:
> Michael Meskes wrote:
>> Yes. ECPG move to the latest backend protocol version to be able to
>> prepare statements correctly. However, with this protocol my own
>> addition to the standard, namely a variable as fetch count, is not
>> supported anymore. But there is a simple workaround. Just sprintf the
>> statement to a string and thereby replace the count variable with its
>> content and then EXEC SQL EXECUTE the string variable should do the job.

> Fetch with a variable seems to be almost the only useful way of using FETCH
> ABSOLUTE (or any of the variants that have count parameter).

> For backwards compatibility wouldn't it be better to do the sprintf in
> the ECPG preprocessor if the count is a variable rather than generate
> an error?

I'm concerned about this too.  We'll at least have to call this out as
an incompatibility in 8.3, and it seems like a rather unnecessary step
backwards.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: tcp_keepalives_idle ignored
Next
From: Tom Lane
Date:
Subject: Re: Forgot to dump old data before re-installing machine