forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1111b26
committed
Undo decision to allow pg_proc.prosrc to be NULL.
Commite717a9a changed the longstanding rule that prosrc is NOT NULLbecause when a SQL-language function is written in SQL-standard style,we don't currently have anything useful to put there. This seems a poordecision though, as it could easily have negative impacts on externalPLs (opening them to crashes they didn't use to have, for instance).SQL-function-related code can just as easily test "is prosqlbody notnull" as "is prosrc null", so there's no real gain there either.Hence, revert the NOT NULL marking removal and adjust related logic.For now, we just put an empty string into prosrc for SQL-standardfunctions. Maybe we'll have a better idea later, although thehistory of things like pg_attrdef.adsrc suggests that it's noteasy to maintain a string equivalent of a node tree.This also adds an assertion that queryDesc->sourceText != NULLto standard_ExecutorStart. We'd been silently relying on thatfor awhile, so let's make it less silent.Also fix some overlooked documentation and test cases.Discussion:https://postgr.es/m/2197698.1617984583@sss.pgh.pa.us1 parent3157cbe commit1111b26
File tree
15 files changed
+109
-79
lines changed- doc/src/sgml
- src
- backend
- catalog
- commands
- executor
- optimizer/util
- bin
- pg_dump
- psql
- include
- catalog
- executor
- test/regress
- expected
- sql
15 files changed
+109
-79
lines changedLines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6007 | 6007 |
| |
6008 | 6008 |
| |
6009 | 6009 |
| |
6010 |
| - | |
6011 |
| - | |
| 6010 | + | |
| 6011 | + | |
| 6012 | + | |
6012 | 6013 |
| |
6013 | 6014 |
| |
6014 | 6015 |
| |
| |||
6036 | 6037 |
| |
6037 | 6038 |
| |
6038 | 6039 |
| |
6039 |
| - | |
| 6040 | + | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
6040 | 6048 |
| |
6041 |
| - | |
| 6049 | + | |
6042 | 6050 |
| |
6043 | 6051 |
| |
6044 | 6052 |
| |
|
Lines changed: 12 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
| 124 | + | |
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 |
| - | |
| 339 | + | |
343 | 340 |
| |
344 | 341 |
| |
345 | 342 |
| |
| |||
874 | 871 |
| |
875 | 872 |
| |
876 | 873 |
| |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
877 | 880 |
| |
878 | 881 |
| |
879 | 882 |
| |
880 | 883 |
| |
881 |
| - | |
| 884 | + | |
882 | 885 |
| |
883 | 886 |
| |
884 | 887 |
| |
885 | 888 |
| |
886 | 889 |
| |
887 | 890 |
| |
888 |
| - | |
889 |
| - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
890 | 894 |
| |
891 | 895 |
| |
892 | 896 |
| |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 |
| - | |
897 | 897 |
| |
898 | 898 |
| |
899 | 899 |
| |
| |||
902 | 902 |
| |
903 | 903 |
| |
904 | 904 |
| |
905 |
| - | |
906 |
| - | |
907 |
| - | |
908 |
| - | |
909 | 905 |
| |
910 | 906 |
| |
911 | 907 |
| |
| |||
1001 | 997 |
| |
1002 | 998 |
| |
1003 | 999 |
| |
1004 |
| - | |
1005 |
| - | |
1006 |
| - | |
1007 | 1000 |
| |
1008 | 1001 |
| |
1009 | 1002 |
| |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
958 | 958 |
| |
959 | 959 |
| |
960 | 960 |
| |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
961 | 971 |
| |
962 |
| - | |
963 | 972 |
| |
964 | 973 |
| |
965 | 974 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| 198 | + | |
| 199 | + | |
198 | 200 |
| |
199 | 201 |
| |
200 | 202 |
| |
|
Lines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
667 | 667 |
| |
668 | 668 |
| |
669 | 669 |
| |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
670 | 679 |
| |
671 | 680 |
| |
672 | 681 |
| |
| |||
678 | 687 |
| |
679 | 688 |
| |
680 | 689 |
| |
681 |
| - | |
| 690 | + | |
682 | 691 |
| |
683 | 692 |
| |
684 | 693 |
| |
685 | 694 |
| |
686 |
| - | |
687 |
| - | |
688 |
| - | |
689 |
| - | |
690 |
| - | |
691 |
| - | |
692 |
| - | |
693 | 695 |
| |
694 | 696 |
| |
695 | 697 |
| |
| |||
710 | 712 |
| |
711 | 713 |
| |
712 | 714 |
| |
713 |
| - | |
714 |
| - | |
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
|
Lines changed: 32 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4317 | 4317 |
| |
4318 | 4318 |
| |
4319 | 4319 |
| |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
4320 | 4329 |
| |
4321 | 4330 |
| |
4322 | 4331 |
| |
4323 | 4332 |
| |
4324 | 4333 |
| |
4325 |
| - | |
| 4334 | + | |
4326 | 4335 |
| |
4327 | 4336 |
| |
4328 | 4337 |
| |
4329 | 4338 |
| |
4330 | 4339 |
| |
4331 | 4340 |
| |
4332 |
| - | |
| 4341 | + | |
4333 | 4342 |
| |
4334 | 4343 |
| |
4335 |
| - | |
| 4344 | + | |
4336 | 4345 |
| |
4337 |
| - | |
| 4346 | + | |
4338 | 4347 |
| |
4339 | 4348 |
| |
4340 | 4349 |
| |
4341 | 4350 |
| |
4342 |
| - | |
4343 |
| - | |
4344 |
| - | |
4345 |
| - | |
4346 | 4351 |
| |
4347 | 4352 |
| |
4348 | 4353 |
| |
| |||
4354 | 4359 |
| |
4355 | 4360 |
| |
4356 | 4361 |
| |
4357 |
| - | |
4358 |
| - | |
4359 |
| - | |
4360 |
| - | |
4361 | 4362 |
| |
4362 | 4363 |
| |
4363 | 4364 |
| |
| |||
4658 | 4659 |
| |
4659 | 4660 |
| |
4660 | 4661 |
| |
4661 |
| - | |
| 4662 | + | |
| 4663 | + | |
4662 | 4664 |
| |
4663 |
| - | |
4664 |
| - | |
4665 |
| - | |
4666 |
| - | |
4667 |
| - | |
4668 |
| - | |
4669 |
| - | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
4670 | 4668 |
| |
4671 | 4669 |
| |
4672 | 4670 |
| |
| |||
4778 | 4776 |
| |
4779 | 4777 |
| |
4780 | 4778 |
| |
| 4779 | + | |
4781 | 4780 |
| |
4782 | 4781 |
| |
4783 | 4782 |
| |
| |||
4886 | 4885 |
| |
4887 | 4886 |
| |
4888 | 4887 |
| |
| 4888 | + | |
| 4889 | + | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
4889 | 4897 |
| |
4890 | 4898 |
| |
4891 | 4899 |
| |
4892 | 4900 |
| |
4893 | 4901 |
| |
4894 |
| - | |
| 4902 | + | |
4895 | 4903 |
| |
4896 | 4904 |
| |
4897 | 4905 |
| |
4898 | 4906 |
| |
4899 | 4907 |
| |
4900 | 4908 |
| |
4901 |
| - | |
| 4909 | + | |
4902 | 4910 |
| |
4903 | 4911 |
| |
4904 |
| - | |
| 4912 | + | |
4905 | 4913 |
| |
4906 |
| - | |
| 4914 | + | |
4907 | 4915 |
| |
4908 | 4916 |
| |
4909 | 4917 |
| |
4910 |
| - | |
4911 |
| - | |
4912 |
| - | |
4913 |
| - | |
4914 | 4918 |
| |
4915 | 4919 |
| |
4916 | 4920 |
| |
| |||
4927 | 4931 |
| |
4928 | 4932 |
| |
4929 | 4933 |
| |
4930 |
| - | |
4931 |
| - | |
4932 |
| - | |
4933 |
| - | |
4934 |
| - | |
4935 |
| - | |
4936 | 4934 |
| |
4937 | 4935 |
| |
4938 | 4936 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12247 | 12247 |
| |
12248 | 12248 |
| |
12249 | 12249 |
| |
12250 |
| - | |
| 12250 | + | |
12251 | 12251 |
| |
12252 | 12252 |
| |
12253 | 12253 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
512 | 512 |
| |
513 | 513 |
| |
514 | 514 |
| |
515 |
| - | |
| 515 | + | |
516 | 516 |
| |
517 | 517 |
| |
518 | 518 |
| |
|
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: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
| 115 | + | |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 | 20 |
| |
24 | 21 |
| |
25 | 22 |
| |
| |||
35 | 32 |
| |
36 | 33 |
| |
37 | 34 |
| |
| 35 | + | |
| 36 | + | |
38 | 37 |
| |
39 | 38 |
| |
40 | 39 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
293 | 299 |
| |
294 | 300 |
| |
295 | 301 |
| |
|
0 commit comments
Comments
(0)