forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf7f70d5
committed
Create composite array types for initdb-created relations.
When we invented arrays of composite types (commitbc8036f),we excluded system catalogs, basically just on the grounds of notwanting to bloat pg_type. However, it's definitely inconsistent thatcatalogs' composite types can't be put into arrays when others can.Another problem is that the exclusion is done by checkingIsUnderPostmaster in heap_create_with_catalog, which means that(1) If a user tries to create a table in single-user mode, it doesn'tget an array type. That's bad in itself, plus it breaks pg_upgrade.(2) If someone drops and recreates a system view or information_schemaview (as we occasionally recommend doing), it will now have an arraytype where it did not before, making for still more inconsistency.So this is all pretty messy. Let's just get rid of the inconsistencyand decree that system-created relations should have array types ifsimilar user-created ones would, i.e. it only depends on the relkind.As of HEAD, that means that the initial contents of pg_type grow from411 rows to 605, which is a lot of growth percentage-wise, but it'sstill quite a small catalog compared to others.Wenjing Zeng, reviewed by Shawn Wang, further hacking by meDiscussion:https://postgr.es/m/761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com1 parentbae9e8a commitf7f70d5
File tree
3 files changed
+13
-16
lines changed- src
- backend/catalog
- include/catalog
3 files changed
+13
-16
lines changedLines changed: 8 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1262 | 1262 |
| |
1263 | 1263 |
| |
1264 | 1264 |
| |
1265 |
| - | |
1266 |
| - | |
1267 |
| - | |
1268 |
| - | |
1269 |
| - | |
1270 |
| - | |
1271 |
| - | |
1272 |
| - | |
1273 |
| - | |
1274 |
| - | |
1275 |
| - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1276 | 1273 |
| |
1277 | 1274 |
| |
1278 | 1275 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 |
| - | |
| 116 | + | |
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
| 126 | + | |
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
| 131 | + | |
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
|
0 commit comments
Comments
(0)