Commit 80eacaa
committed
Clean up includes from RLS patch
The initial patch for RLS mistakenly included headers associated with
the executor and planner bits in rewrite/rowsecurity.h. Per policy and
general good sense, executor headers should not be included in planner
headers or vice versa.
The include of execnodes.h was a mistaken holdover from previous
versions, while the include of relation.h was used for Relation's
definition, which should have been coming from utils/relcache.h. This
patch cleans these issues up, adds comments to the RowSecurityPolicy
struct and the RowSecurityConfigType enum, and changes Relation->rsdesc
to Relation->rd_rsdesc to follow Relation field naming convention.
Additionally, utils/rel.h was including rewrite/rowsecurity.h, which
wasn't a great idea since that was pulling in things not really needed
in utils/rel.h (which gets included in quite a few places). Instead,
use 'struct RowSecurityDesc' for the rd_rsdesc field and add comments
explaining why.
Lastly, add an include into access/nbtree/nbtsort.c for
utils/sortsupport.h, which was evidently missed due to the above mess.
Pointed out by Tom in 16970.1415838651@sss.pgh.pa.us; note that the
concerns regarding a similar situation in the custom-path commit still
need to be addressed.1 parent 79172a5 commit 80eacaa
File tree
6 files changed
+29
-25
lines changed- src
- backend
- access/nbtree
- commands
- rewrite
- utils/cache
- include
- rewrite
- utils
6 files changed
+29
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | | - | |
| 1056 | + | |
1056 | 1057 | | |
1057 | 1058 | | |
1058 | 1059 | | |
| |||
2024 | 2025 | | |
2025 | 2026 | | |
2026 | 2027 | | |
2027 | | - | |
2028 | | - | |
| 2028 | + | |
| 2029 | + | |
2029 | 2030 | | |
2030 | 2031 | | |
2031 | 2032 | | |
| |||
2200 | 2201 | | |
2201 | 2202 | | |
2202 | 2203 | | |
2203 | | - | |
| 2204 | + | |
2204 | 2205 | | |
2205 | 2206 | | |
2206 | 2207 | | |
| |||
2250 | 2251 | | |
2251 | 2252 | | |
2252 | 2253 | | |
2253 | | - | |
| 2254 | + | |
2254 | 2255 | | |
2255 | 2256 | | |
2256 | 2257 | | |
| |||
3435 | 3436 | | |
3436 | 3437 | | |
3437 | 3438 | | |
3438 | | - | |
| 3439 | + | |
3439 | 3440 | | |
3440 | 3441 | | |
3441 | 3442 | | |
3442 | | - | |
| 3443 | + | |
3443 | 3444 | | |
3444 | 3445 | | |
3445 | 3446 | | |
| |||
4815 | 4816 | | |
4816 | 4817 | | |
4817 | 4818 | | |
4818 | | - | |
| 4819 | + | |
4819 | 4820 | | |
4820 | 4821 | | |
4821 | 4822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments