Commit b154d8a
committed
Add pg_basetype() function to extract a domain's base type.
This SQL-callable function behaves much like our internal utility
function getBaseType(), except it returns NULL rather than failing for
an invalid type OID. (That behavior is modeled on our experience with
other catalog-inquiry functions such as the ACL checking functions.)
The key advantage over doing a join to pg_type is that it will loop
as needed to find the bottom base type of a nest of domains.
Steve Chavez, reviewed by jian he and others
Discussion: https://postgr.es/m/CAGRrpzZSX8j=MQcbCSEisFA=ic=K3bknVfnFjAv1diVJxFHJvg@mail.gmail.com1 parent ecf741c commit b154d8a
File tree
6 files changed
+110
-1
lines changed- doc/src/sgml
- src
- backend/utils/adt
- include/catalog
- test/regress
- expected
- sql
6 files changed
+110
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25129 | 25129 | | |
25130 | 25130 | | |
25131 | 25131 | | |
| 25132 | + | |
| 25133 | + | |
| 25134 | + | |
| 25135 | + | |
| 25136 | + | |
| 25137 | + | |
| 25138 | + | |
| 25139 | + | |
| 25140 | + | |
| 25141 | + | |
| 25142 | + | |
| 25143 | + | |
| 25144 | + | |
| 25145 | + | |
| 25146 | + | |
| 25147 | + | |
| 25148 | + | |
| 25149 | + | |
| 25150 | + | |
| 25151 | + | |
| 25152 | + | |
| 25153 | + | |
| 25154 | + | |
| 25155 | + | |
25132 | 25156 | | |
25133 | 25157 | | |
25134 | 25158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
566 | 567 | | |
567 | 568 | | |
568 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
569 | 614 | | |
570 | 615 | | |
571 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3889 | 3889 | | |
3890 | 3890 | | |
3891 | 3891 | | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
3892 | 3895 | | |
3893 | 3896 | | |
3894 | 3897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1247 | 1272 | | |
1248 | 1273 | | |
1249 | 1274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
842 | 854 | | |
843 | 855 | | |
844 | 856 | | |
| |||
0 commit comments