forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf7c5ff3
committed
Fix plpgsql's exec_eval_expr() to ensure it returns a sane type OID
even when the expression is a query that returns no rows.So far as I can tell, the only caller that actually fails when a garbageOID is returned is exec_stmt_case(), which is new in 8.4 --- in all othercases, we might make a useless trip through casting logic, but we won'tfail since the isnull flag will be set. Hence, backpatch only to 8.4,just in case there are apps out there that aren't expecting an error tobe thrown if the query returns more or less than one column. (Which seemsunlikely, since the error would be thrown if the query ever did return arow; but it's possible there's some never-exercised code out there.)Per report from Mario Splivalo.1 parent73981cb commitf7c5ff3
1 file changed
+22
-14
lines changedLines changed: 22 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
4158 | 4158 |
| |
4159 | 4159 |
| |
4160 | 4160 |
| |
4161 |
| - | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
| 4174 | + | |
| 4175 | + | |
| 4176 | + | |
| 4177 | + | |
| 4178 | + | |
4162 | 4179 |
| |
4163 | 4180 |
| |
4164 | 4181 |
| |
| |||
4167 | 4184 |
| |
4168 | 4185 |
| |
4169 | 4186 |
| |
4170 |
| - | |
| 4187 | + | |
4171 | 4188 |
| |
4172 |
| - | |
| 4189 | + | |
4173 | 4190 |
| |
4174 | 4191 |
| |
4175 | 4192 |
| |
4176 | 4193 |
| |
4177 |
| - | |
4178 |
| - | |
4179 |
| - | |
4180 |
| - | |
4181 |
| - | |
4182 |
| - | |
4183 |
| - | |
4184 |
| - | |
4185 | 4194 |
| |
4186 | 4195 |
| |
4187 |
| - | |
| 4196 | + | |
4188 | 4197 |
| |
4189 |
| - | |
4190 | 4198 |
| |
4191 | 4199 |
| |
4192 | 4200 |
| |
|
0 commit comments
Comments
(0)