forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit904af8d
committed
Fix handling of strict non-set functions with NULLs in set-valued inputs.
In a construct like "select plain_function(set_returning_function(...))",the plain function is applied to each output row of the SRF successively.If some of the SRF outputs are NULL, and the plain function is strict,you'd expect to get NULL results for such rows ... but what actuallyhappened was that such rows were omitted entirely from the result set.This was due to confusion of this case with what should happen for nestedset-returning functions; a strict SRF is indeed supposed to yield an emptyset for null input. Per bug #8150 from Erwin Brandstetter.Although this has been broken forever, we're not back-patching becauseof the possibility that some apps out there expect the incorrect behavior.This change should be listed as a possible incompatibility in the 9.3release notes.1 parentf0ed3a8 commit904af8d
File tree
3 files changed
+19
-1
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+19
-1
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1801 | 1801 |
| |
1802 | 1802 |
| |
1803 | 1803 |
| |
1804 |
| - | |
| 1804 | + | |
1805 | 1805 |
| |
| 1806 | + | |
1806 | 1807 |
| |
1807 | 1808 |
| |
1808 | 1809 |
| |
1809 | 1810 |
| |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1810 | 1818 |
| |
1811 | 1819 |
| |
1812 | 1820 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1542 | 1542 |
| |
1543 | 1543 |
| |
1544 | 1544 |
| |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
1545 | 1554 |
| |
1546 | 1555 |
| |
1547 | 1556 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
432 | 432 |
| |
433 | 433 |
| |
434 | 434 |
| |
| 435 | + | |
435 | 436 |
| |
436 | 437 |
| |
437 | 438 |
| |
|
0 commit comments
Comments
(0)