Unix Technical Forum

pgsql: Adjust DatumGetBool macro so that it isn't fooled by garbage in

This is a discussion on pgsql: Adjust DatumGetBool macro so that it isn't fooled by garbage in within the pgsql Committers forums, part of the PostgreSQL category; --> Log Message: ----------- Adjust DatumGetBool macro so that it isn't fooled by garbage in the Datum to the left ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Committers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:52 PM
Tom Lane
 
Posts: n/a
Default pgsql: Adjust DatumGetBool macro so that it isn't fooled by garbage in

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/include:
postgres.h (r1.77 -> r1.78)
(http://developer.postgresql.org/cvsw...1=1.77&r2=1.78)

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com