Commit 7cd9765
committed
Re-allow DISTINCT in pl/pgsql expressions.
I'd omitted this from the grammar in commit c9d5298, figuring that
it wasn't worth supporting. However we already have one complaint,
so it seems that judgment was wrong. It doesn't require a huge
amount of code, so add it back. (I'm still drawing the line at
UNION/INTERSECT/EXCEPT though: those'd require an unreasonable
amount of grammar refactoring, and the single-result-row restriction
makes them near useless anyway.)
Also rethink the documentation: this behavior is a property of
all pl/pgsql expressions, not just assignments.
Discussion: https://postgr.es/m/20210122134106.e94c5cd7@mail.verfriemelt.org1 parent ab66645 commit 7cd9765
File tree
3 files changed
+70
-35
lines changed- doc/src/sgml
- src/backend/parser
3 files changed
+70
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
920 | 938 | | |
921 | 939 | | |
922 | 940 | | |
| |||
973 | 991 | | |
974 | 992 | | |
975 | 993 | | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | 994 | | |
991 | 995 | | |
992 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2466 | 2466 | | |
2467 | 2467 | | |
2468 | 2468 | | |
2469 | | - | |
| 2469 | + | |
2470 | 2470 | | |
2471 | 2471 | | |
2472 | 2472 | | |
| |||
2590 | 2590 | | |
2591 | 2591 | | |
2592 | 2592 | | |
2593 | | - | |
2594 | | - | |
2595 | | - | |
2596 | | - | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
2597 | 2616 | | |
2598 | 2617 | | |
2599 | 2618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| |||
11260 | 11261 | | |
11261 | 11262 | | |
11262 | 11263 | | |
| 11264 | + | |
| 11265 | + | |
| 11266 | + | |
| 11267 | + | |
| 11268 | + | |
11263 | 11269 | | |
11264 | 11270 | | |
11265 | 11271 | | |
| |||
11497 | 11503 | | |
11498 | 11504 | | |
11499 | 11505 | | |
| 11506 | + | |
| 11507 | + | |
| 11508 | + | |
| 11509 | + | |
| 11510 | + | |
11500 | 11511 | | |
11501 | | - | |
| 11512 | + | |
11502 | 11513 | | |
11503 | 11514 | | |
11504 | 11515 | | |
| |||
15065 | 15076 | | |
15066 | 15077 | | |
15067 | 15078 | | |
15068 | | - | |
| 15079 | + | |
15069 | 15080 | | |
15070 | 15081 | | |
15071 | 15082 | | |
15072 | 15083 | | |
15073 | 15084 | | |
15074 | 15085 | | |
15075 | | - | |
15076 | | - | |
15077 | | - | |
15078 | | - | |
15079 | | - | |
15080 | | - | |
15081 | | - | |
15082 | | - | |
| 15086 | + | |
| 15087 | + | |
| 15088 | + | |
| 15089 | + | |
| 15090 | + | |
| 15091 | + | |
| 15092 | + | |
| 15093 | + | |
| 15094 | + | |
15083 | 15095 | | |
15084 | | - | |
15085 | | - | |
| 15096 | + | |
| 15097 | + | |
15086 | 15098 | | |
15087 | | - | |
| 15099 | + | |
15088 | 15100 | | |
15089 | 15101 | | |
15090 | 15102 | | |
15091 | | - | |
| 15103 | + | |
15092 | 15104 | | |
15093 | | - | |
| 15105 | + | |
15094 | 15106 | | |
15095 | 15107 | | |
15096 | 15108 | | |
| |||
0 commit comments