After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311967 - gda_value_get_binary() broken for postgres
gda_value_get_binary() broken for postgres
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: PostgreSQL provider
unspecified
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-29 13:15 UTC by Murray Cumming
Modified: 2005-09-15 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2005-07-29 13:15:10 UTC
With the postgres provider (in 1.2 and unstable 2.0),
gda_value_get_binary() returns an escaped string instead of the binary
data.

The code to unescape the string is commented-out in
providers/postgres/utils.c:gda_postgres_set_value(), because the
PQunescapeBytea() was introduced only in Postgres 7.3. Are you willing
to depend on postgres 7.3 (7.4 and 8.0 are shipped by current distro
versions), or should I copy the PQunescapeBytea() code (BSD-licensed)
into libgda?

In glom, I have copied PQunescapeBytea() into my source code.
Comment 1 Daniel Espinosa 2005-08-22 16:47:18 UTC
I think, is better to depen on a version >= 7.4, becouse the avarability in
nearly all distros.
Comment 2 malerba 2005-09-15 11:17:39 UTC
I've corrected the code assuming that PQunescapeBytea() is present in the libpq
library (assuming a version of postgres >= 7.3 is not a big deal as 7.3 was
released end of 2002 and is not shipped anymore by any distribution).