GNOME Bugzilla – Bug 311967
gda_value_get_binary() broken for postgres
Last modified: 2005-09-15 11:17:39 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.
I think, is better to depen on a version >= 7.4, becouse the avarability in nearly all distros.
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).