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

BUG #1619: ECPG allows definition of binary cursors but can't handle the result

From: "" <matthias(dot)schinacher(at)gmx(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1619: ECPG allows definition of binary cursors but can't handle the result
Date: 2005-04-22 14:17:10
Message-ID: 20050422141710.611A1F144B@svr2.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      1619
Logged by:          
Email address:      matthias(dot)schinacher(at)gmx(dot)de
PostgreSQL version: 8.0.1
Operating system:   Suse Linux 9.1 (x86)
Description:        ECPG allows definition of binary cursors but can't
handle the result
Details: 

I'm not certain this is a "bug", but seems a un-documented restriction of
ECPG.

one can use a binary cursor definition in a ECPG program, but there is no
(or no documented) way of fetching the data into host variables, as this
allways assumes a text representation.

thus for example, when fetching an integer type field from a binary cursor
into a 'int', the applied conversion implicitly assumes an empty string if
the first byte retrieved is '\0' and will assign a zero value to the 'int',
even if the binary representation received from the server has a non zero
interpretation (.e.g. like receiving the  four bytes 00,FF,FF and FF).

maybe it would be a good idea to explicitly mention this in the manual as a
restriction and/or to generate
an error when ecpg encounters a binary cursor?

pgsql-bugs by date

Next:From: Nahuel GrecoDate: 2005-04-22 19:39:33
Subject: BUG #1620: triggers breaks with alter table (at least with plpythonu)
Previous:From: Kris JurkaDate: 2005-04-22 13:54:32
Subject: Re: BUG #1611: reading a date-field by "ResultSet.getTimestamp()"

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