forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5c292e6
committed
Declare lead() and lag() using anycompatible not anyelement.
This allows use of a "default" expression that doesn't slavishlymatch the data column's type. Formerly you got something like"function lag(numeric, integer, integer) does not exist", whichis not just unhelpful but actively misleading.The SQL spec suggests that the default should be coerced to the datacolumn's type, but this implementation instead chooses the commonsupertype, which seems at least as reasonable.(Note: I took the opportunity to run "make reformat-dat-files" onpg_proc.dat, so this commit includes some cosmetic changes torecently-added entries that aren't related to lead/lag.)Vik FearingDiscussion:https://postgr.es/m/77675130-89da-dab1-51dd-492c93dcf5d1@postgresfriends.org1 parent40c24bf commit5c292e6
File tree
5 files changed
+58
-24
lines changed- doc/src/sgml
- src
- include/catalog
- test/regress
- expected
- sql
5 files changed
+58
-24
lines changedLines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19594 | 19594 |
| |
19595 | 19595 |
| |
19596 | 19596 |
| |
19597 |
| - | |
| 19597 | + | |
19598 | 19598 |
| |
19599 |
| - | |
19600 |
| - | |
| 19599 | + | |
| 19600 | + | |
19601 | 19601 |
| |
19602 | 19602 |
| |
19603 | 19603 |
| |
19604 | 19604 |
| |
19605 | 19605 |
| |
19606 | 19606 |
| |
19607 |
| - | |
| 19607 | + | |
19608 | 19608 |
| |
19609 | 19609 |
| |
19610 | 19610 |
| |
| |||
19619 | 19619 |
| |
19620 | 19620 |
| |
19621 | 19621 |
| |
19622 |
| - | |
| 19622 | + | |
19623 | 19623 |
| |
19624 |
| - | |
19625 |
| - | |
| 19624 | + | |
| 19625 | + | |
19626 | 19626 |
| |
19627 | 19627 |
| |
19628 | 19628 |
| |
19629 | 19629 |
| |
19630 | 19630 |
| |
19631 | 19631 |
| |
19632 |
| - | |
| 19632 | + | |
19633 | 19633 |
| |
19634 | 19634 |
| |
19635 | 19635 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Lines changed: 17 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1563 | 1563 |
| |
1564 | 1564 |
| |
1565 | 1565 |
| |
1566 |
| - | |
| 1566 | + | |
1567 | 1567 |
| |
1568 | 1568 |
| |
1569 | 1569 |
| |
1570 |
| - | |
| 1570 | + | |
1571 | 1571 |
| |
1572 | 1572 |
| |
1573 | 1573 |
| |
| |||
5257 | 5257 |
| |
5258 | 5258 |
| |
5259 | 5259 |
| |
5260 |
| - | |
5261 |
| - | |
| 5260 | + | |
| 5261 | + | |
5262 | 5262 |
| |
5263 | 5263 |
| |
5264 | 5264 |
| |
| |||
5491 | 5491 |
| |
5492 | 5492 |
| |
5493 | 5493 |
| |
5494 |
| - | |
5495 |
| - | |
| 5494 | + | |
5496 | 5495 |
| |
5497 | 5496 |
| |
5498 | 5497 |
| |
| |||
5615 | 5614 |
| |
5616 | 5615 |
| |
5617 | 5616 |
| |
5618 |
| - | |
5619 |
| - | |
| 5617 | + | |
| 5618 | + | |
| 5619 | + | |
5620 | 5620 |
| |
5621 | 5621 |
| |
5622 | 5622 |
| |
| |||
7833 | 7833 |
| |
7834 | 7834 |
| |
7835 | 7835 |
| |
7836 |
| - | |
7837 |
| - | |
7838 |
| - | |
| 7836 | + | |
| 7837 | + | |
| 7838 | + | |
| 7839 | + | |
| 7840 | + | |
7839 | 7841 |
| |
7840 | 7842 |
| |
7841 | 7843 |
| |
| |||
9748 | 9750 |
| |
9749 | 9751 |
| |
9750 | 9752 |
| |
9751 |
| - | |
9752 |
| - | |
| 9753 | + | |
| 9754 | + | |
9753 | 9755 |
| |
9754 | 9756 |
| |
9755 | 9757 |
| |
| |||
9758 | 9760 |
| |
9759 | 9761 |
| |
9760 | 9762 |
| |
9761 |
| - | |
9762 |
| - | |
| 9763 | + | |
| 9764 | + | |
9763 | 9765 |
| |
9764 | 9766 |
| |
9765 | 9767 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
303 | 318 |
| |
304 | 319 |
| |
305 | 320 |
| |
| |||
345 | 360 |
| |
346 | 361 |
| |
347 | 362 |
| |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
348 | 378 |
| |
349 | 379 |
| |
350 | 380 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| 66 | + | |
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| 73 | + | |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
|
0 commit comments
Comments
(0)