forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit878f3a1
committed
Remove INSERT privilege check at table creation of CTAS and matview
As per discussion with Peter Eisentraunt, the SQL standard specifiesthat any tuple insertion done as part of CREATE TABLE AS happens withoutany extra ACL check, so it makes little sense to keep a check for INSERTprivileges when using WITH DATA. Materialized views are not part of thestandard, but similarly, this check can be confusing as this refers toan access check on a table created within the same command as the onethat would insert data into this table.This commit removes the INSERT privilege check for WITH DATA, thedefault, that846005e removed partially, but only for WITH NO DATA.Author: Bharath RupireddyDiscussion:https://postgr.es/m/d049c272-9a47-d783-46b0-46665b011598@enterprisedb.com1 parenta47834d commit878f3a1
File tree
7 files changed
+75
-118
lines changed- doc/src/sgml/ref
- src
- backend/commands
- test/regress
- expected
- sql
7 files changed
+75
-118
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
| 55 | + | |
57 | 56 |
| |
58 | 57 |
| |
59 | 58 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
60 |
| - | |
61 |
| - | |
| 59 | + | |
62 | 60 |
| |
63 | 61 |
| |
64 | 62 |
| |
|
Lines changed: 0 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
432 | 432 |
| |
433 | 433 |
| |
434 | 434 |
| |
435 |
| - | |
436 | 435 |
| |
437 | 436 |
| |
438 | 437 |
| |
| |||
443 | 442 |
| |
444 | 443 |
| |
445 | 444 |
| |
446 |
| - | |
447 | 445 |
| |
448 | 446 |
| |
449 | 447 |
| |
| |||
505 | 503 |
| |
506 | 504 |
| |
507 | 505 |
| |
508 |
| - | |
509 |
| - | |
510 |
| - | |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 |
| - | |
519 |
| - | |
520 |
| - | |
521 |
| - | |
522 |
| - | |
523 |
| - | |
524 |
| - | |
525 |
| - | |
526 |
| - | |
527 |
| - | |
528 |
| - | |
529 |
| - | |
530 |
| - | |
531 |
| - | |
532 | 506 |
| |
533 | 507 |
| |
534 | 508 |
| |
|
Lines changed: 15 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
596 | 596 |
| |
597 | 597 |
| |
598 | 598 |
| |
599 |
| - | |
600 | 599 |
| |
601 |
| - | |
602 |
| - | |
| 600 | + | |
603 | 601 |
| |
604 |
| - | |
605 |
| - | |
606 |
| - | |
607 |
| - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
608 | 611 |
| |
609 | 612 |
| |
610 | 613 |
| |
| |||
616 | 619 |
| |
617 | 620 |
| |
618 | 621 |
| |
| 622 | + | |
619 | 623 |
| |
620 | 624 |
| |
621 | 625 |
| |
622 | 626 |
| |
623 |
| - | |
624 |
| - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
625 | 631 |
| |
626 | 632 |
|
Lines changed: 40 additions & 46 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
35 | 28 |
| |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
40 | 37 |
| |
41 | 38 |
| |
42 |
| - | |
| 39 | + | |
43 | 40 |
| |
44 | 41 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
50 | 47 |
| |
51 | 48 |
| |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
56 | 52 |
| |
57 |
| - | |
58 | 53 |
| |
59 |
| - | |
| 54 | + | |
60 | 55 |
| |
61 |
| - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 | 78 |
| |
| 79 | + | |
87 | 80 |
| |
88 |
| - | |
89 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
90 | 85 |
| |
| 86 | + | |
| 87 | + | |
91 | 88 |
| |
92 | 89 |
| |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 | 90 |
| |
97 | 91 |
| |
98 | 92 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
248 |
| - | |
249 | 248 |
| |
250 |
| - | |
| 249 | + | |
251 | 250 |
| |
252 |
| - | |
253 |
| - | |
254 |
| - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
255 | 254 |
| |
256 | 255 |
| |
257 | 256 |
| |
258 | 257 |
| |
259 | 258 |
| |
| 259 | + | |
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
|
Lines changed: 13 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
38 | 33 |
| |
39 |
| - | |
40 |
| - | |
41 |
| - | |
| 34 | + | |
| 35 | + | |
42 | 36 |
| |
43 | 37 |
| |
44 |
| - | |
| 38 | + | |
45 | 39 |
| |
46 | 40 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
52 | 45 |
| |
53 | 46 |
| |
54 |
| - | |
| 47 | + | |
55 | 48 |
| |
56 | 49 |
| |
57 | 50 |
| |
| |||
65 | 58 |
| |
66 | 59 |
| |
67 | 60 |
| |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 | 61 |
| |
77 | 62 |
| |
| 63 | + | |
78 | 64 |
| |
79 | 65 |
| |
80 | 66 |
| |
|
0 commit comments
Comments
(0)