- Notifications
You must be signed in to change notification settings - Fork5
Commitbac3e83
committed
Replace the hard-wired type knowledge in TypeCategory() and IsPreferredType()
with system catalog lookups, as was foreseen to be necessary almost sincetheir creation. Instead put the information into two new pg_type columns,typcategory and typispreferred. Add support for setting these whencreating a user-defined base type.The category column is just a "char" (i.e. a poor man's enum), allowinga crude form of user extensibility of the category list: just use anotherwise-unused character. This seems sufficient for foreseen uses,but we could upgrade to having an actual category catalog someday, ifthere proves to be a huge demand for custom type categories.In this patch I have attempted to hew exactly to the behavior of theprevious hardwired logic, except for introducing new type categories forarrays, composites, and enums. In particular the default preferred statefor user-defined types remains TRUE. That seems worth revisiting, but itshould be done as a separate patch from introducing the infrastructure.Likewise, any adjustment of the standard set of categories should be doneseparately.1 parentab9907f commitbac3e83
File tree
20 files changed
+617
-497
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- parser
- utils/cache
- bin/pg_dump
- include
- catalog
- parser
- utils
- test/regress
- expected
- sql
20 files changed
+617
-497
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
997 | | - | |
| 997 | + | |
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
| 1008 | + | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
| 1121 | + | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
2172 | | - | |
| 2172 | + | |
2173 | 2173 | | |
2174 | 2174 | | |
2175 | 2175 | | |
| |||
4855 | 4855 | | |
4856 | 4856 | | |
4857 | 4857 | | |
4858 | | - | |
| 4858 | + | |
4859 | 4859 | | |
4860 | 4860 | | |
4861 | 4861 | | |
| |||
4926 | 4926 | | |
4927 | 4927 | | |
4928 | 4928 | | |
4929 | | - | |
4930 | | - | |
| 4929 | + | |
4931 | 4930 | | |
4932 | 4931 | | |
4933 | 4932 | | |
| |||
4947 | 4946 | | |
4948 | 4947 | | |
4949 | 4948 | | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
| 4957 | + | |
| 4958 | + | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
4950 | 4971 | | |
4951 | 4972 | | |
4952 | 4973 | | |
| |||
5217 | 5238 | | |
5218 | 5239 | | |
5219 | 5240 | | |
| 5241 | + | |
| 5242 | + | |
| 5243 | + | |
| 5244 | + | |
| 5245 | + | |
| 5246 | + | |
| 5247 | + | |
| 5248 | + | |
| 5249 | + | |
| 5250 | + | |
| 5251 | + | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
| 5256 | + | |
| 5257 | + | |
| 5258 | + | |
| 5259 | + | |
| 5260 | + | |
| 5261 | + | |
| 5262 | + | |
| 5263 | + | |
| 5264 | + | |
| 5265 | + | |
| 5266 | + | |
| 5267 | + | |
| 5268 | + | |
| 5269 | + | |
| 5270 | + | |
| 5271 | + | |
| 5272 | + | |
| 5273 | + | |
| 5274 | + | |
| 5275 | + | |
| 5276 | + | |
| 5277 | + | |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
| 5282 | + | |
| 5283 | + | |
| 5284 | + | |
| 5285 | + | |
| 5286 | + | |
| 5287 | + | |
| 5288 | + | |
| 5289 | + | |
| 5290 | + | |
| 5291 | + | |
| 5292 | + | |
| 5293 | + | |
| 5294 | + | |
| 5295 | + | |
| 5296 | + | |
| 5297 | + | |
| 5298 | + | |
| 5299 | + | |
| 5300 | + | |
| 5301 | + | |
| 5302 | + | |
| 5303 | + | |
| 5304 | + | |
| 5305 | + | |
| 5306 | + | |
| 5307 | + | |
| 5308 | + | |
| 5309 | + | |
| 5310 | + | |
| 5311 | + | |
| 5312 | + | |
| 5313 | + | |
| 5314 | + | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
5220 | 5321 | | |
5221 | 5322 | | |
5222 | 5323 | | |
| |||
5787 | 5888 | | |
5788 | 5889 | | |
5789 | 5890 | | |
5790 | | - | |
| 5891 | + | |
5791 | 5892 | | |
5792 | 5893 | | |
5793 | 5894 | | |
| |||
6036 | 6137 | | |
6037 | 6138 | | |
6038 | 6139 | | |
6039 | | - | |
| 6140 | + | |
6040 | 6141 | | |
6041 | 6142 | | |
6042 | 6143 | | |
| |||
6121 | 6222 | | |
6122 | 6223 | | |
6123 | 6224 | | |
6124 | | - | |
| 6225 | + | |
6125 | 6226 | | |
6126 | 6227 | | |
6127 | 6228 | | |
| |||
6316 | 6417 | | |
6317 | 6418 | | |
6318 | 6419 | | |
6319 | | - | |
| 6420 | + | |
6320 | 6421 | | |
6321 | 6422 | | |
6322 | 6423 | | |
| |||
6774 | 6875 | | |
6775 | 6876 | | |
6776 | 6877 | | |
6777 | | - | |
| 6878 | + | |
6778 | 6879 | | |
6779 | 6880 | | |
6780 | 6881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
284 | 307 | | |
285 | 308 | | |
286 | 309 | | |
| |||
494 | 517 | | |
495 | 518 | | |
496 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
497 | 545 | | |
498 | 546 | | |
499 | 547 | | |
| |||
0 commit comments
Comments
(0)