aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/dbsize.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-25 19:31:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-25 19:31:31 +0000
commit0a11e1063d5773eecce7f598f153b235ad8c02c8 (patch)
tree35e33a1a4330ad8b97a85367c051f11146fae79f /src/backend/utils/adt/dbsize.c
parent0d9f21a3ea490c2c6d2e5df285825ab32906cdb2 (diff)
downloadpostgresql-0a11e1063d5773eecce7f598f153b235ad8c02c8.tar.gz
postgresql-0a11e1063d5773eecce7f598f153b235ad8c02c8.zip
Adjust DatumGetBool macro so that it isn't fooled by garbage in the Datum
to the left of the actual bool value. While in most cases there won't be any, our support for old-style user-defined functions violates the C spec to the extent of calling functions that might return char or short through a function pointer declared to return "char *", which we then coerce to Datum. It is not surprising that the result might contain garbage high-order bits ... what is surprising is that we didn't see such cases long ago. Per report from Magnus. This is a back-patch of a change that was made in HEAD almost exactly a year ago. I had refrained from back-patching at the time, but now we find that this is *necessary* for contrib to work with gcc 4.3.
Diffstat (limited to 'src/backend/utils/adt/dbsize.c')
0 files changed, 0 insertions, 0 deletions