forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit23a4157
committed
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 beany, our support for old-style user-defined functions violates the C specto the extent of calling functions that might return char or short througha function pointer declared to return "char *", which we then coerce toDatum. It is not surprising that the result might contain garbagehigh-order bits ... what is surprising is that we didn't see such caseslong ago. Per report from Magnus.1 parent547b6e5 commit23a4157
1 file changed
+11
-5
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
128 |
| - | |
129 |
| - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 |
| |
131 | 135 |
| |
132 | 136 |
| |
133 | 137 |
| |
134 | 138 |
| |
| 139 | + | |
135 | 140 |
| |
136 | 141 |
| |
137 | 142 |
| |
| |||
145 | 150 |
| |
146 | 151 |
| |
147 | 152 |
| |
148 |
| - | |
| 153 | + | |
| 154 | + | |
149 | 155 |
| |
150 | 156 |
| |
151 |
| - | |
| 157 | + | |
152 | 158 |
| |
153 | 159 |
| |
154 | 160 |
| |
|
0 commit comments
Comments
(0)