- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit088c833
committed
ALTER TABLE .. FORCE ROW LEVEL SECURITY
To allow users to force RLS to always be applied, even for table owners,add ALTER TABLE .. FORCE ROW LEVEL SECURITY.row_security=off overrides FORCE ROW LEVEL SECURITY, to ensure pg_dumpoutput is complete (by default).Also add SECURITY_NOFORCE_RLS context to avoid data corruption whenALTER TABLE .. FORCE ROW SECURITY is being used. TheSECURITY_NOFORCE_RLS security context is used only during referentialintegrity checks and is only considered in check_enable_rls() after wehave already checked that the current user is the owner of the relation(which should always be the case during referential integrity checks).Back-patch to 9.5 where RLS was added.1 parent16a70e3 commit088c833
File tree
19 files changed
+537
-64
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- parser
- utils
- adt
- init
- misc
- bin
- pg_dump
- psql
- include
- catalog
- nodes
- test
- modules/test_ddl_deparse
- regress
- expected
- output
- sql
19 files changed
+537
-64
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1971 | 1971 |
| |
1972 | 1972 |
| |
1973 | 1973 |
| |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
1974 | 1984 |
| |
1975 | 1985 |
| |
1976 | 1986 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
| 65 | + | |
64 | 66 |
| |
65 | 67 |
| |
66 | 68 |
| |
| |||
433 | 435 |
| |
434 | 436 |
| |
435 | 437 |
| |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
436 | 453 |
| |
437 | 454 |
| |
438 | 455 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
802 | 802 |
| |
803 | 803 |
| |
804 | 804 |
| |
| 805 | + | |
805 | 806 |
| |
806 | 807 |
| |
807 | 808 |
| |
|
Lines changed: 40 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
| 422 | + | |
422 | 423 |
| |
423 | 424 |
| |
424 | 425 |
| |
| |||
2930 | 2931 |
| |
2931 | 2932 |
| |
2932 | 2933 |
| |
| 2934 | + | |
| 2935 | + | |
2933 | 2936 |
| |
2934 | 2937 |
| |
2935 | 2938 |
| |
| |||
3351 | 3354 |
| |
3352 | 3355 |
| |
3353 | 3356 |
| |
| 3357 | + | |
| 3358 | + | |
3354 | 3359 |
| |
3355 | 3360 |
| |
3356 | 3361 |
| |
| |||
3667 | 3672 |
| |
3668 | 3673 |
| |
3669 | 3674 |
| |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
3670 | 3681 |
| |
3671 | 3682 |
| |
3672 | 3683 |
| |
| |||
11066 | 11077 |
| |
11067 | 11078 |
| |
11068 | 11079 |
| |
| 11080 | + | |
| 11081 | + | |
| 11082 | + | |
| 11083 | + | |
| 11084 | + | |
| 11085 | + | |
| 11086 | + | |
| 11087 | + | |
| 11088 | + | |
| 11089 | + | |
| 11090 | + | |
| 11091 | + | |
| 11092 | + | |
| 11093 | + | |
| 11094 | + | |
| 11095 | + | |
| 11096 | + | |
| 11097 | + | |
| 11098 | + | |
| 11099 | + | |
| 11100 | + | |
| 11101 | + | |
| 11102 | + | |
| 11103 | + | |
| 11104 | + | |
| 11105 | + | |
| 11106 | + | |
| 11107 | + | |
| 11108 | + | |
11069 | 11109 |
| |
11070 | 11110 |
| |
11071 | 11111 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2353 | 2353 |
| |
2354 | 2354 |
| |
2355 | 2355 |
| |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
2356 | 2370 |
| |
2357 | 2371 |
| |
2358 | 2372 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3014 | 3014 |
| |
3015 | 3015 |
| |
3016 | 3016 |
| |
3017 |
| - | |
| 3017 | + | |
| 3018 | + | |
3018 | 3019 |
| |
3019 | 3020 |
| |
3020 | 3021 |
| |
| |||
3134 | 3135 |
| |
3135 | 3136 |
| |
3136 | 3137 |
| |
3137 |
| - | |
| 3138 | + | |
| 3139 | + | |
3138 | 3140 |
| |
3139 | 3141 |
| |
3140 | 3142 |
| |
|
Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
| 344 | + | |
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
| |||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
362 | 369 |
| |
363 | 370 |
| |
364 | 371 |
| |
| |||
401 | 408 |
| |
402 | 409 |
| |
403 | 410 |
| |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
404 | 420 |
| |
405 | 421 |
| |
406 | 422 |
| |
|
Lines changed: 39 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
| |||
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
| 72 | + | |
71 | 73 |
| |
72 | 74 |
| |
73 | 75 |
| |
| |||
76 | 78 |
| |
77 | 79 |
| |
78 | 80 |
| |
79 |
| - | |
80 |
| - | |
81 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 |
| |
83 |
| - | |
84 |
| - | |
| 87 | + | |
85 | 88 |
| |
86 | 89 |
| |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
87 | 121 |
| |
88 | 122 |
| |
89 | 123 |
| |
|
0 commit comments
Comments
(0)