- Notifications
You must be signed in to change notification settings - Fork5
Commit24aef33
committed
Cleanup of rewriter and planner handling of Query.hasRowSecurity flag.
Be sure to pull up the subquery's hasRowSecurity flag when flattening asubquery in pull_up_simple_subquery(). This isn't a bug today becausewe don't look at the hasRowSecurity flag during planning, but it couldeasily be a bug tomorrow.Likewise, make rewriteRuleAction() pull up the hasRowSecurity flag whenabsorbing RTEs from a rule action. This isn't a bug either, for theopposite reason: the flag should never be set yet. But again, it seemslike good future proofing.Add a comment explaining why rewriteTargetView() should *not* sethasRowSecurity when adding stuff to securityQuals.Improve some nearby comments about securityQuals processing, and documentthat field more completely in parsenodes.h.Patch by me, analysis by Dean Rasheed.Discussion: <CAEZATCXZ8tb2DV6f=bkhsMV6u_gRcZ0CZBw2J-qU84RxSukZog@mail.gmail.com>1 parent530f806 commit24aef33
File tree
3 files changed
+36
-8
lines changed- src
- backend
- optimizer/prep
- rewrite
- include/nodes
3 files changed
+36
-8
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1187 | 1187 |
| |
1188 | 1188 |
| |
1189 | 1189 |
| |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1190 | 1193 |
| |
1191 | 1194 |
| |
1192 | 1195 |
| |
|
Lines changed: 25 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
446 | 446 |
| |
447 | 447 |
| |
448 | 448 |
| |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
449 | 458 |
| |
450 | 459 |
| |
451 | 460 |
| |
| |||
1835 | 1844 |
| |
1836 | 1845 |
| |
1837 | 1846 |
| |
1838 |
| - | |
1839 |
| - | |
1840 |
| - | |
1841 |
| - | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
1842 | 1851 |
| |
1843 | 1852 |
| |
1844 | 1853 |
| |
| |||
2957 | 2966 |
| |
2958 | 2967 |
| |
2959 | 2968 |
| |
2960 |
| - | |
2961 |
| - | |
2962 |
| - | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
2963 | 2972 |
| |
2964 | 2973 |
| |
2965 | 2974 |
| |
| |||
2980 | 2989 |
| |
2981 | 2990 |
| |
2982 | 2991 |
| |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
2983 | 2996 |
| |
2984 | 2997 |
| |
2985 | 2998 |
| |
2986 | 2999 |
| |
2987 | 3000 |
| |
2988 | 3001 |
| |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
2989 | 3007 |
| |
2990 | 3008 |
| |
2991 | 3009 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
775 | 775 |
| |
776 | 776 |
| |
777 | 777 |
| |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
778 | 785 |
| |
779 | 786 |
| |
780 | 787 |
| |
| |||
872 | 879 |
| |
873 | 880 |
| |
874 | 881 |
| |
875 |
| - | |
| 882 | + | |
876 | 883 |
| |
877 | 884 |
| |
878 | 885 |
| |
|
0 commit comments
Comments
(0)