- Notifications
You must be signed in to change notification settings - Fork5
Commit8e18d04
committed
Refine our definition of what constitutes a system relation.
Although user-defined relations can't be directly created inpg_catalog, it's possible for them to end up there, because you cancreate them in some other schema and then use ALTER TABLE .. SET SCHEMAto move them there. Previously, such relations couldn't afterwardsbe manipulated, because IsSystemRelation()/IsSystemClass() rejectedall attempts to modify objects in the pg_catalog schema, regardlessof their origin. With this patch, they now reject only thoseobjects in pg_catalog which were created at initdb-time, allowingmost operations on user-created tables in pg_catalog to proceednormally.This patch also adds new functions IsCatalogRelation() andIsCatalogClass(), which is similar to IsSystemRelation() andIsSystemClass() but with a slightly narrower definition: only TOASTtables of system catalogs are included, rather than *all* TOAST tables.This is currently used only for making decisions about wheninvalidation messages need to be sent, but upcoming logical decodingpatches will find other uses for this information.Andres Freund, with some modifications by me.1 parent2fe69ca commit8e18d04
File tree
15 files changed
+149
-31
lines changed- src
- backend
- access/heap
- catalog
- commands
- optimizer/util
- rewrite
- tcop
- utils/cache
- include/catalog
- test/regress
- expected
- sql
15 files changed
+149
-31
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2465 | 2465 |
| |
2466 | 2466 |
| |
2467 | 2467 |
| |
2468 |
| - | |
| 2468 | + | |
2469 | 2469 |
| |
2470 | 2470 |
| |
2471 | 2471 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3628 | 3628 |
| |
3629 | 3629 |
| |
3630 | 3630 |
| |
3631 |
| - | |
| 3631 | + | |
3632 | 3632 |
| |
3633 | 3633 |
| |
3634 | 3634 |
| |
|
Lines changed: 58 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 |
| |
102 | 105 |
| |
103 | 106 |
| |
104 | 107 |
| |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
| 108 | + | |
110 | 109 |
| |
111 | 110 |
| |
112 | 111 |
| |
113 | 112 |
| |
114 |
| - | |
115 |
| - | |
| 113 | + | |
116 | 114 |
| |
117 | 115 |
| |
118 | 116 |
| |
| |||
122 | 120 |
| |
123 | 121 |
| |
124 | 122 |
| |
125 |
| - | |
| 123 | + | |
126 | 124 |
| |
127 |
| - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
128 | 144 |
| |
129 |
| - | |
130 |
| - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
131 | 177 |
| |
132 | 178 |
| |
133 | 179 |
| |
|
Lines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
259 |
| - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
260 | 266 |
| |
261 | 267 |
| |
262 |
| - | |
| 268 | + | |
| 269 | + | |
263 | 270 |
| |
264 | 271 |
| |
265 | 272 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1354 | 1354 |
| |
1355 | 1355 |
| |
1356 | 1356 |
| |
1357 |
| - | |
| 1357 | + | |
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 | 1360 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1824 | 1824 |
| |
1825 | 1825 |
| |
1826 | 1826 |
| |
| 1827 | + | |
1827 | 1828 |
| |
1828 | 1829 |
| |
1829 | 1830 |
| |
| |||
1835 | 1836 |
| |
1836 | 1837 |
| |
1837 | 1838 |
| |
1838 |
| - | |
| 1839 | + | |
1839 | 1840 |
| |
1840 | 1841 |
| |
1841 | 1842 |
| |
| |||
1850 | 1851 |
| |
1851 | 1852 |
| |
1852 | 1853 |
| |
1853 |
| - | |
| 1854 | + | |
1854 | 1855 |
| |
1855 | 1856 |
| |
1856 | 1857 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
910 | 910 |
| |
911 | 911 |
| |
912 | 912 |
| |
913 |
| - | |
| 913 | + | |
914 | 914 |
| |
915 | 915 |
| |
916 | 916 |
| |
| |||
2105 | 2105 |
| |
2106 | 2106 |
| |
2107 | 2107 |
| |
2108 |
| - | |
| 2108 | + | |
2109 | 2109 |
| |
2110 | 2110 |
| |
2111 | 2111 |
| |
| |||
10872 | 10872 |
| |
10873 | 10873 |
| |
10874 | 10874 |
| |
10875 |
| - | |
| 10875 | + | |
10876 | 10876 |
| |
10877 | 10877 |
| |
10878 | 10878 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1174 | 1174 |
| |
1175 | 1175 |
| |
1176 | 1176 |
| |
1177 |
| - | |
| 1177 | + | |
1178 | 1178 |
| |
1179 | 1179 |
| |
1180 | 1180 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
| 131 | + | |
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
858 | 858 |
| |
859 | 859 |
| |
860 | 860 |
| |
861 |
| - | |
| 861 | + | |
862 | 862 |
| |
863 | 863 |
| |
864 | 864 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 |
| - | |
| 1043 | + | |
1044 | 1044 |
| |
1045 | 1045 |
| |
1046 |
| - | |
| 1046 | + | |
1047 | 1047 |
| |
1048 | 1048 |
| |
1049 | 1049 |
| |
1050 |
| - | |
1051 |
| - | |
| 1050 | + | |
| 1051 | + | |
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 | 1054 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 |
| - | |
| 30 | + | |
30 | 31 |
| |
| 32 | + | |
31 | 33 |
| |
32 | 34 |
| |
33 | 35 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2337 | 2337 |
| |
2338 | 2338 |
| |
2339 | 2339 |
| |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + |
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1567 | 1567 |
| |
1568 | 1568 |
| |
1569 | 1569 |
| |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + |
0 commit comments
Comments
(0)