GNOME Bugzilla – Bug 652702
COUNT() query returns a gchararray GValue
Last modified: 2011-06-16 17:34:52 UTC
Created attachment 190020 [details] test_value_count.c With previous versions of libgda, this COUNT() query returned a gint64 GValue, but now it returns a gvaluearray GValue, which is obviously wrong for a number value. See the attached test case. This is happening with both libgda-5.0 and recent versions of libgda-4.0 (at least 4.2.4 on Ubuntu Natty. It seems to work with libgda 4.99.0 I guess it could be a change in PostgreSQL, but that seems unlikely. It's documented as returning a "bigint": http://www.postgresql.org/docs/9.0/static/functions-aggregate.html
(In reply to comment #0) > Created an attachment (id=190020) [details] > test_value_count.c > > With previous versions of libgda, this COUNT() query returned a gint64 GValue, > but now it returns a gvaluearray GValue, which is obviously wrong for a number > value. See the attached test case. > > This is happening with both libgda-5.0 and recent versions of libgda-4.0 (at > least 4.2.4 on Ubuntu Natty. It seems to work with libgda 4.99.0 Actually, no, there doesn't seem to be the same problem with libgda 4. It does seem to be caused by the GdaNull change in bug #647633.
Corrected in git/master, see http://git.gnome.org/browse/libgda/commit/?id=59d355dd023a2ef328b8d5f53bc0b519c6e7eef7 Thanks!