PostgreSQL Source Code: src/backend/utils/cache/lsyscache.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
48#include "utils/fmgroids.h"
52
53
55
56
57
58
59
60
61
62
63
64
65
66bool
68{
73}
74
75
76
77
78
79
80
81
82
83int
85{
88 int result;
89
95 return 0;
97 result = amop_tup->amopstrategy;
99 return result;
100}
101
102
103
104
105
106
107
110{
113 Oid result;
114
122 result = amop_tup->amopsortfamily;
124 return result;
125}
126
127
128
129
130
131
132
133
134
135
136void
138 int *strategy,
139 Oid *lefttype,
140 Oid *righttype)
141{
144
147 CharGetDatum(ordering_op ? AMOP_ORDER : AMOP_SEARCH),
150 elog(ERROR, "operator %u is not a member of opfamily %u",
151 opno, opfamily);
153 *strategy = amop_tup->amopstrategy;
154 *lefttype = amop_tup->amoplefttype;
155 *righttype = amop_tup->amoprighttype;
157}
158
159
160
161
162
163
164
165
169{
172 Oid result;
173
182 result = amop_tup->amopopr;
184 return result;
185}
186
187
188
189
190
191
192
193
194
198{
199 Oid opmethod;
201
204 if (!strategy)
207}
208
209
210
211
212
213
214
215
216
217
218
219static bool
221{
222 switch (amoid)
223 {
224 case BTREE_AM_OID:
225 return true;
226 case HASH_AM_OID:
227 case GIST_AM_OID:
228 case GIN_AM_OID:
229 case SPGIST_AM_OID:
230 case BRIN_AM_OID:
231 return false;
232 default:
233 {
234 bool result;
236
238 pfree(amroutine);
239 return result;
240 }
241 }
242}
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264bool
267{
268 bool result = false;
270 int i;
271
272
276
277
278
279
280
282
284 {
288
289
291 continue;
292
294 aform->amopmethod,
295 aform->amopfamily,
296 true);
297
299 {
300
301 if (aform->amoplefttype == aform->amoprighttype)
302 {
303
304 *opfamily = aform->amopfamily;
305 *opcintype = aform->amoplefttype;
306 *cmptype = am_cmptype;
307 result = true;
308 break;
309 }
310 }
311 }
312
314
315 return result;
316}
317
318
319
320
321
322
323
324
325
326
327
328
331{
333 Oid opfamily;
334 Oid opcintype;
336
337
339 &opfamily, &opcintype, &cmptype))
340 {
341
343 opcintype,
344 opcintype,
346 if (reverse)
348 }
349
350 return result;
351}
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
369{
372 int i;
373
374
375
376
377
379
381 {
385
386
388 continue;
389
391 aform->amopmethod,
392 aform->amopfamily,
393 true);
395 {
396
397 Oid typid;
398
399 typid = use_lhs_type ? aform->amoplefttype : aform->amoprighttype;
401 typid, typid,
404 break;
405
406 }
407 }
408
410
411 return result;
412}
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
435{
438 int i;
439
440
441
442
443
445
447 {
450
451
454 aform->amopmethod,
455 aform->amopfamily,
457 result = lappend_oid(result, aform->amopfamily);
458 }
459
461
462 return result;
463}
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480bool
482 Oid *lhs_opno, Oid *rhs_opno)
483{
484 bool result = false;
486 int i;
487
488
489 if (lhs_opno)
491 if (rhs_opno)
493
494
495
496
497
498
500
502 {
505
506 if (aform->amopmethod == HASH_AM_OID &&
508 {
509
510 if (aform->amoplefttype == aform->amoprighttype)
511 {
512 if (lhs_opno)
513 *lhs_opno = opno;
514 if (rhs_opno)
515 *rhs_opno = opno;
516 result = true;
517 break;
518 }
519
520
521
522
523
524
525 if (lhs_opno)
526 {
528 aform->amoplefttype,
529 aform->amoplefttype,
532 continue;
533
534 if (!rhs_opno)
535 {
536 result = true;
537 break;
538 }
539 }
540 if (rhs_opno)
541 {
543 aform->amoprighttype,
544 aform->amoprighttype,
547 {
548
549 if (lhs_opno)
551 continue;
552 }
553
554 result = true;
555 break;
556 }
557 }
558 }
559
561
562 return result;
563}
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580bool
583{
584 bool result = false;
586 int i;
587
588
589 if (lhs_procno)
591 if (rhs_procno)
593
594
595
596
597
598
600
602 {
605
606 if (aform->amopmethod == HASH_AM_OID &&
608 {
609
610
611
612
613
614 if (lhs_procno)
615 {
617 aform->amoplefttype,
618 aform->amoplefttype,
621 continue;
622
623 if (!rhs_procno)
624 {
625 result = true;
626 break;
627 }
628
629 if (aform->amoplefttype == aform->amoprighttype)
630 {
631 *rhs_procno = *lhs_procno;
632 result = true;
633 break;
634 }
635 }
636 if (rhs_procno)
637 {
639 aform->amoprighttype,
640 aform->amoprighttype,
643 {
644
645 if (lhs_procno)
647 continue;
648 }
649
650 result = true;
651 break;
652 }
653 }
654 }
655
657
658 return result;
659}
660
661
662
663
664
665
666
667
668
669
670
673{
677 int i;
678
679
680
681
683
685 {
689
690
692 continue;
693
694
696 op_form->amopmethod,
697 op_form->amopfamily,
698 true);
699
700
702 continue;
703
706 thisresult->opfamily_id = op_form->amopfamily;
707 thisresult->cmptype = cmptype;
708 thisresult->oplefttype = op_form->amoplefttype;
709 thisresult->oprighttype = op_form->amoprighttype;
710 result = lappend(result, thisresult);
711 }
712
714
715
716
717
718
719 if (result == NIL)
720 {
722
724 {
727
729 {
734
735
737 continue;
738
739
741 op_form->amopmethod,
742 op_form->amopfamily,
743 true);
744
745
747 continue;
748
749
752 thisresult->opfamily_id = op_form->amopfamily;
754 thisresult->oplefttype = op_form->amoplefttype;
755 thisresult->oprighttype = op_form->amoprighttype;
756 result = lappend(result, thisresult);
757 }
758
760 }
761 }
762
763 return result;
764}
765
766
767
768
769
770
771
772
773
774
775
776
777
778bool
780{
781 bool result;
783 int i;
784
785
786 if (opno1 == opno2)
787 return true;
788
789
790
791
793
794 result = false;
796 {
799
800
801
802
803
805 {
807
809 {
810 result = true;
811 break;
812 }
813 }
814 }
815
817
818 return result;
819}
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834bool
836{
837 bool result;
839 int i;
840
841
842 if (opno1 == opno2)
843 return true;
844
845
846
847
849
850 result = false;
852 {
855
856
857
858
859
861 {
863
865 {
866 result = true;
867 break;
868 }
869 }
870 }
871
873
874 return result;
875}
876
877
878
879
880
881
882
883
884
885
886
889{
893
902 result = amproc_tup->amproc;
904 return result;
905}
906
907
908
909
910
911
912
913
914
915
916
917
918char *
920{
922
926 {
928 char *result;
929
932 return result;
933 }
934
935 if (!missing_ok)
936 elog(ERROR, "cache lookup failed for attribute %d of relation %u",
938 return NULL;
939}
940
941
942
943
944
945
946
947
948
951{
953
956 {
959
960 result = att_tup->attnum;
962 return result;
963 }
964 else
966}
967
968
969
970
971
972
973
974
975
976
977
978
979char
981{
984 char result;
985
990 elog(ERROR, "cache lookup failed for attribute %d of relation %u",
993 result = att_tup->attgenerated;
995 return result;
996}
997
998
999
1000
1001
1002
1003
1006{
1008
1013 {
1015 Oid result;
1016
1017 result = att_tup->atttypid;
1019 return result;
1020 }
1021 else
1023}
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034void
1037{
1040
1045 elog(ERROR, "cache lookup failed for attribute %d of relation %u",
1048
1049 *typid = att_tup->atttypid;
1050 *typmod = att_tup->atttypmod;
1051 *collid = att_tup->attcollation;
1053}
1054
1055
1056
1057
1058
1059
1060
1063{
1067 bool isnull;
1068
1072
1074 elog(ERROR, "cache lookup failed for attribute %d of relation %u",
1076
1077 attopts = SysCacheGetAttr(ATTNAME, tuple, Anum_pg_attribute_attoptions,
1078 &isnull);
1079
1080 if (isnull)
1081 result = (Datum) 0;
1082 else
1083 result = datumCopy(attopts, false, -1);
1084
1086
1087 return result;
1088}
1089
1090
1091
1092
1093
1094
1095
1096
1097
1100{
1101 Oid oid;
1102
1103 oid = GetSysCacheOid2(CASTSOURCETARGET, Anum_pg_cast_oid,
1106 if ((oid) && !missing_ok)
1108 (errcode(ERRCODE_UNDEFINED_OBJECT),
1109 errmsg("cast from type %s to type %s does not exist",
1112 return oid;
1113}
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126char *
1128{
1130
1133 {
1135 char *result;
1136
1139 return result;
1140 }
1141 else
1142 return NULL;
1143}
1144
1145bool
1147{
1150 bool result;
1151
1154 elog(ERROR, "cache lookup failed for collation %u", colloid);
1156 result = colltup->collisdeterministic;
1158 return result;
1159}
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172char *
1174{
1176
1179 {
1181 char *result;
1182
1185 return result;
1186 }
1187 else
1188 return NULL;
1189}
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1206{
1208
1211 {
1213 Oid result;
1214
1215 if (contup->contype == CONSTRAINT_UNIQUE ||
1216 contup->contype == CONSTRAINT_PRIMARY ||
1217 contup->contype == CONSTRAINT_EXCLUSION)
1218 result = contup->conindid;
1219 else
1222 return result;
1223 }
1224 else
1226}
1227
1228
1229
1230
1231
1232
1233
1234char
1236{
1238 char contype;
1239
1242 elog(ERROR, "cache lookup failed for constraint %u", conoid);
1243
1246
1247 return contype;
1248}
1249
1250
1251
1252char *
1254{
1256
1259 {
1261 char *result;
1262
1265 return result;
1266 }
1267
1268 if (!missing_ok)
1269 elog(ERROR, "cache lookup failed for language %u",
1270 langoid);
1271 return NULL;
1272}
1273
1274
1275
1276
1277
1278
1279
1280
1283{
1286 Oid result;
1287
1290 elog(ERROR, "cache lookup failed for opclass %u", opclass);
1292
1293 result = cla_tup->opcfamily;
1295 return result;
1296}
1297
1298
1299
1300
1301
1302
1305{
1308 Oid result;
1309
1312 elog(ERROR, "cache lookup failed for opclass %u", opclass);
1314
1315 result = cla_tup->opcintype;
1317 return result;
1318}
1319
1320
1321
1322
1323
1324
1325
1326bool
1328{
1331
1334 return false;
1335
1337
1338 *opfamily = cla_tup->opcfamily;
1339 *opcintype = cla_tup->opcintype;
1340
1342
1343 return true;
1344}
1345
1346
1347
1348
1349
1350
1353{
1356 Oid result;
1357
1360 elog(ERROR, "cache lookup failed for opclass %u", opclass);
1362
1363 result = cla_tup->opcmethod;
1365 return result;
1366}
1367
1368
1369
1370
1371
1372
1373
1374
1377{
1380 Oid result;
1381
1384 elog(ERROR, "cache lookup failed for operator family %u", opfid);
1386
1387 result = opfform->opfmethod;
1389 return result;
1390}
1391
1392char *
1394{
1396 char *opfname;
1398
1400
1402 {
1403 if (!missing_ok)
1404 elog(ERROR, "cache lookup failed for operator family %u", opfid);
1405 return NULL;
1406 }
1407
1410
1412
1413 return opfname;
1414}
1415
1416
1417
1418
1419
1420
1421
1422
1423
1426{
1428
1431 {
1434
1435 result = optup->oprcode;
1437 return result;
1438 }
1439 else
1441}
1442
1443
1444
1445
1446
1447
1448
1449char *
1451{
1453
1456 {
1458 char *result;
1459
1462 return result;
1463 }
1464 else
1465 return NULL;
1466}
1467
1468
1469
1470
1471
1474{
1476
1479 {
1481 Oid result;
1482
1483 result = optup->oprresult;
1485 return result;
1486 }
1487 else
1489}
1490
1491
1492
1493
1494
1495
1496
1497void
1499{
1502
1505 elog(ERROR, "cache lookup failed for operator %u", opno);
1507 *lefttype = optup->oprleft;
1508 *righttype = optup->oprright;
1510}
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525bool
1527{
1528 bool result = false;
1531
1532
1533
1534
1535
1536
1537
1538 if (opno == ARRAY_EQ_OP)
1539 {
1541 if (typentry->cmp_proc == F_BTARRAYCMP)
1542 result = true;
1543 }
1544 else if (opno == RECORD_EQ_OP)
1545 {
1547 if (typentry->cmp_proc == F_BTRECORDCMP)
1548 result = true;
1549 }
1550 else
1551 {
1552
1555 {
1557
1558 result = optup->oprcanmerge;
1560 }
1561 }
1562 return result;
1563}
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576bool
1578{
1579 bool result = false;
1582
1583
1584 if (opno == ARRAY_EQ_OP)
1585 {
1587 if (typentry->hash_proc == F_HASH_ARRAY)
1588 result = true;
1589 }
1590 else if (opno == RECORD_EQ_OP)
1591 {
1593 if (typentry->hash_proc == F_HASH_RECORD)
1594 result = true;
1595 }
1596 else
1597 {
1598
1601 {
1603
1604 result = optup->oprcanhash;
1606 }
1607 }
1608 return result;
1609}
1610
1611
1612
1613
1614
1615
1616bool
1618{
1620
1622 elog(ERROR, "operator %u does not exist", opno);
1623
1625}
1626
1627
1628
1629
1630
1631
1632char
1634{
1636
1638 elog(ERROR, "operator %u does not exist", opno);
1639
1641}
1642
1643
1644
1645
1646
1647
1650{
1652
1655 {
1657 Oid result;
1658
1659 result = optup->oprcom;
1661 return result;
1662 }
1663 else
1665}
1666
1667
1668
1669
1670
1671
1674{
1676
1679 {
1681 Oid result;
1682
1683 result = optup->oprnegate;
1685 return result;
1686 }
1687 else
1689}
1690
1691
1692
1693
1694
1695
1698{
1700
1703 {
1706
1707 result = optup->oprrest;
1709 return result;
1710 }
1711 else
1713}
1714
1715
1716
1717
1718
1719
1722{
1724
1727 {
1730
1731 result = optup->oprjoin;
1733 return result;
1734 }
1735 else
1737}
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747char *
1749{
1751
1754 {
1756 char *result;
1757
1760 return result;
1761 }
1762 else
1763 return NULL;
1764}
1765
1766
1767
1768
1769
1770
1773{
1775
1778 {
1780 Oid result;
1781
1782 result = functup->pronamespace;
1784 return result;
1785 }
1786 else
1788}
1789
1790
1791
1792
1793
1796{
1798 Oid result;
1799
1802 elog(ERROR, "cache lookup failed for function %u", funcid);
1803
1806 return result;
1807}
1808
1809
1810
1811
1812
1813int
1815{
1817 int result;
1818
1821 elog(ERROR, "cache lookup failed for function %u", funcid);
1822
1825 return result;
1826}
1827
1828
1829
1830
1831
1832
1833
1834
1837{
1840 Oid result;
1841
1844 elog(ERROR, "cache lookup failed for function %u", funcid);
1845
1847
1848 result = procstruct->prorettype;
1849 *nargs = (int) procstruct->pronargs;
1850 Assert(*nargs == procstruct->proargtypes.dim1);
1851 *argtypes = (Oid *) palloc(*nargs * sizeof(Oid));
1852 memcpy(*argtypes, procstruct->proargtypes.values, *nargs * sizeof(Oid));
1853
1855 return result;
1856}
1857
1858
1859
1860
1861
1864{
1866 Oid result;
1867
1870 elog(ERROR, "cache lookup failed for function %u", funcid);
1871
1874 return result;
1875}
1876
1877
1878
1879
1880
1881bool
1883{
1885 bool result;
1886
1889 elog(ERROR, "cache lookup failed for function %u", funcid);
1890
1893 return result;
1894}
1895
1896
1897
1898
1899
1900bool
1902{
1904 bool result;
1905
1908 elog(ERROR, "cache lookup failed for function %u", funcid);
1909
1912 return result;
1913}
1914
1915
1916
1917
1918
1919char
1921{
1923 char result;
1924
1927 elog(ERROR, "cache lookup failed for function %u", funcid);
1928
1931 return result;
1932}
1933
1934
1935
1936
1937
1938char
1940{
1942 char result;
1943
1946 elog(ERROR, "cache lookup failed for function %u", funcid);
1947
1950 return result;
1951}
1952
1953
1954
1955
1956
1957char
1959{
1961 char result;
1962
1965 elog(ERROR, "cache lookup failed for function %u", funcid);
1966
1969 return result;
1970}
1971
1972
1973
1974
1975
1976bool
1978{
1980 bool result;
1981
1984 elog(ERROR, "cache lookup failed for function %u", funcid);
1985
1988 return result;
1989}
1990
1991
1992
1993
1994
1995
1996
1999{
2001
2004 {
2007
2008 result = functup->prosupport;
2010 return result;
2011 }
2012 else
2014}
2015
2016
2017
2018
2019
2020
2021
2022
2023
2026{
2030}
2031
2032#ifdef NOT_USED
2033
2034
2035
2036
2037
2038int
2039get_relnatts(Oid relid)
2040{
2042
2045 {
2047 int result;
2048
2049 result = reltup->relnatts;
2051 return result;
2052 }
2053 else
2055}
2056#endif
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067char *
2069{
2071
2074 {
2076 char *result;
2077
2080 return result;
2081 }
2082 else
2083 return NULL;
2084}
2085
2086
2087
2088
2089
2090
2093{
2095
2098 {
2100 Oid result;
2101
2102 result = reltup->relnamespace;
2104 return result;
2105 }
2106 else
2108}
2109
2110
2111
2112
2113
2114
2115
2116
2117
2120{
2122
2125 {
2127 Oid result;
2128
2129 result = reltup->reltype;
2131 return result;
2132 }
2133 else
2135}
2136
2137
2138
2139
2140
2141
2142char
2144{
2146
2149 {
2151 char result;
2152
2153 result = reltup->relkind;
2155 return result;
2156 }
2157 else
2158 return '\0';
2159}
2160
2161
2162
2163
2164
2165
2166bool
2168{
2170
2173 {
2175 bool result;
2176
2177 result = reltup->relispartition;
2179 return result;
2180 }
2181 else
2182 return false;
2183}
2184
2185
2186
2187
2188
2189
2190
2191
2192
2195{
2197
2200 {
2202 Oid result;
2203
2204 result = reltup->reltablespace;
2206 return result;
2207 }
2208 else
2210}
2211
2212
2213
2214
2215
2216
2217char
2219{
2222 char result;
2223
2226 elog(ERROR, "cache lookup failed for relation %u", relid);
2228 result = reltup->relpersistence;
2230
2231 return result;
2232}
2233
2234
2235
2236
2237
2238
2241{
2244 Oid result;
2245
2248 elog(ERROR, "cache lookup failed for relation %u", relid);
2250 result = reltup->relam;
2252
2253 return result;
2254}
2255
2256
2257
2258
2261{
2263
2266
2270 {
2271 Oid funcid;
2272
2275 return funcid;
2276 }
2277 else
2279}
2280
2283{
2285
2288
2292 {
2293 Oid funcid;
2294
2297 return funcid;
2298 }
2299 else
2301}
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312bool
2314{
2316
2319 {
2321 bool result;
2322
2323 result = typtup->typisdefined;
2325 return result;
2326 }
2327 else
2328 return false;
2329}
2330
2331
2332
2333
2334
2335
2338{
2340
2343 {
2346
2347 result = typtup->typlen;
2349 return result;
2350 }
2351 else
2352 return 0;
2353}
2354
2355
2356
2357
2358
2359
2360
2361bool
2363{
2365
2368 {
2370 bool result;
2371
2372 result = typtup->typbyval;
2374 return result;
2375 }
2376 else
2377 return false;
2378}
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390void
2392{
2395
2398 elog(ERROR, "cache lookup failed for type %u", typid);
2400 *typlen = typtup->typlen;
2401 *typbyval = typtup->typbyval;
2403}
2404
2405
2406
2407
2408
2409
2410void
2413{
2416
2419 elog(ERROR, "cache lookup failed for type %u", typid);
2421 *typlen = typtup->typlen;
2422 *typbyval = typtup->typbyval;
2423 *typalign = typtup->typalign;
2425}
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2444{
2446
2447
2448
2449
2450
2451 if (OidIsValid(typeStruct->typelem))
2452 return typeStruct->typelem;
2453 else
2454 return typeStruct->oid;
2455}
2456
2457
2458
2459
2460
2461
2462
2463
2464void
2468 bool *typbyval,
2470 char *typdelim,
2471 Oid *typioparam,
2472 Oid *func)
2473{
2476
2477
2478
2479
2480
2482 {
2483 Oid typinput;
2484 Oid typoutput;
2485
2487 typlen,
2488 typbyval,
2490 typdelim,
2491 typioparam,
2492 &typinput,
2493 &typoutput);
2494 switch (which_func)
2495 {
2497 *func = typinput;
2498 break;
2500 *func = typoutput;
2501 break;
2502 default:
2503 elog(ERROR, "binary I/O not supported during bootstrap");
2504 break;
2505 }
2506 return;
2507 }
2508
2511 elog(ERROR, "cache lookup failed for type %u", typid);
2513
2514 *typlen = typeStruct->typlen;
2515 *typbyval = typeStruct->typbyval;
2516 *typalign = typeStruct->typalign;
2517 *typdelim = typeStruct->typdelim;
2519 switch (which_func)
2520 {
2522 *func = typeStruct->typinput;
2523 break;
2525 *func = typeStruct->typoutput;
2526 break;
2528 *func = typeStruct->typreceive;
2529 break;
2531 *func = typeStruct->typsend;
2532 break;
2533 }
2535}
2536
2537#ifdef NOT_USED
2538char
2539get_typalign(Oid typid)
2540{
2542
2545 {
2547 char result;
2548
2549 result = typtup->typalign;
2551 return result;
2552 }
2553 else
2554 return TYPALIGN_INT;
2555}
2556#endif
2557
2558char
2560{
2562
2565 {
2567 char result;
2568
2569 result = typtup->typstorage;
2571 return result;
2572 }
2573 else
2574 return TYPSTORAGE_PLAIN;
2575}
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2589{
2593 bool isNull;
2595
2598 elog(ERROR, "cache lookup failed for type %u", typid);
2600
2601
2602
2603
2604
2605
2607 typeTuple,
2608 Anum_pg_type_typdefaultbin,
2609 &isNull);
2610
2611 if (!isNull)
2612 {
2613
2615 }
2616 else
2617 {
2618
2620 typeTuple,
2621 Anum_pg_type_typdefault,
2622 &isNull);
2623
2624 if (!isNull)
2625 {
2626 char *strDefaultVal;
2627
2628
2630
2633
2635 -1,
2636 type->typcollation,
2637 type->typlen,
2638 datum,
2639 false,
2640 type->typbyval);
2641 pfree(strDefaultVal);
2642 }
2643 else
2644 {
2645
2646 expr = NULL;
2647 }
2648 }
2649
2651
2652 return expr;
2653}
2654
2655
2656
2657
2658
2659
2662{
2663 int32 typmod = -1;
2664
2666}
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2679{
2680
2681
2682
2683 for (;;)
2684 {
2687
2690 elog(ERROR, "cache lookup failed for type %u", typid);
2692 if (typTup->typtype != TYPTYPE_DOMAIN)
2693 {
2694
2696 break;
2697 }
2698
2699 Assert(*typmod == -1);
2700 typid = typTup->typbasetype;
2701 *typmod = typTup->typtypmod;
2702
2704 }
2705
2706 return typid;
2707}
2708
2709
2710
2711
2712
2713
2714
2715
2716
2719{
2722
2723
2724
2725
2726 if (typlen > 0)
2727 return typlen;
2728
2729
2730
2731
2732
2734 if (maxwidth > 0)
2735 {
2736
2737
2738
2739
2740
2741 if (typid == BPCHAROID)
2742 return maxwidth;
2743 if (maxwidth <= 32)
2744 return maxwidth;
2745 if (maxwidth < 1000)
2746 return 32 + (maxwidth - 32) / 2;
2747
2748
2749
2750
2751
2752
2753 return 32 + (1000 - 32) / 2;
2754 }
2755
2756
2757
2758
2759 return 32;
2760}
2761
2762
2763
2764
2765
2766
2767
2768char
2770{
2772
2775 {
2777 char result;
2778
2779 result = typtup->typtype;
2781 return result;
2782 }
2783 else
2784 return '\0';
2785}
2786
2787
2788
2789
2790
2791
2792
2793
2794bool
2796{
2797 if (typid == RECORDOID)
2798 return true;
2800 {
2801 case TYPTYPE_COMPOSITE:
2802 return true;
2803 case TYPTYPE_DOMAIN:
2805 return true;
2806 break;
2807 default:
2808 break;
2809 }
2810 return false;
2811}
2812
2813
2814
2815
2816
2817bool
2819{
2820 return (get_typtype(typid) == TYPTYPE_ENUM);
2821}
2822
2823
2824
2825
2826
2827bool
2829{
2830 return (get_typtype(typid) == TYPTYPE_RANGE);
2831}
2832
2833
2834
2835
2836
2837bool
2839{
2840 return (get_typtype(typid) == TYPTYPE_MULTIRANGE);
2841}
2842
2843
2844
2845
2846
2847
2848
2849void
2851{
2854
2857 elog(ERROR, "cache lookup failed for type %u", typid);
2859 *typcategory = typtup->typcategory;
2860 *typispreferred = typtup->typispreferred;
2862}
2863
2864
2865
2866
2867
2868
2869
2872{
2874
2877 {
2879 Oid result;
2880
2881 result = typtup->typrelid;
2883 return result;
2884 }
2885 else
2887}
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2900{
2902
2905 {
2907 Oid result;
2908
2909 if (IsTrueArrayType(typtup))
2910 result = typtup->typelem;
2911 else
2914 return result;
2915 }
2916 else
2918}
2919
2920
2921
2922
2923
2924
2925
2928{
2931
2934 {
2937 }
2938 return result;
2939}
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2952{
2954
2956 return array_type;
2958 return typid;
2960}
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2973{
2974
2975
2976
2977 for (;;)
2978 {
2981
2984 break;
2986 if (typTup->typtype != TYPTYPE_DOMAIN)
2987 {
2988
2989 Oid result;
2990
2991
2992 if (IsTrueArrayType(typTup))
2993 result = typTup->typelem;
2994 else
2997 return result;
2998 }
2999
3000 typid = typTup->typbasetype;
3002 }
3003
3004
3006}
3007
3008
3009
3010
3011
3012
3013void
3015{
3018
3021 elog(ERROR, "cache lookup failed for type %u", type);
3023
3024 if (!pt->typisdefined)
3026 (errcode(ERRCODE_UNDEFINED_OBJECT),
3027 errmsg("type %s is only a shell",
3031 (errcode(ERRCODE_UNDEFINED_FUNCTION),
3032 errmsg("no input function available for type %s",
3034
3035 *typInput = pt->typinput;
3037
3039}
3040
3041
3042
3043
3044
3045
3046void
3048{
3051
3054 elog(ERROR, "cache lookup failed for type %u", type);
3056
3057 if (!pt->typisdefined)
3059 (errcode(ERRCODE_UNDEFINED_OBJECT),
3060 errmsg("type %s is only a shell",
3064 (errcode(ERRCODE_UNDEFINED_FUNCTION),
3065 errmsg("no output function available for type %s",
3067
3068 *typOutput = pt->typoutput;
3069 *typIsVarlena = (!pt->typbyval) && (pt->typlen == -1);
3070
3072}
3073
3074
3075
3076
3077
3078
3079void
3081{
3084
3087 elog(ERROR, "cache lookup failed for type %u", type);
3089
3090 if (!pt->typisdefined)
3092 (errcode(ERRCODE_UNDEFINED_OBJECT),
3093 errmsg("type %s is only a shell",
3097 (errcode(ERRCODE_UNDEFINED_FUNCTION),
3098 errmsg("no binary input function available for type %s",
3100
3101 *typReceive = pt->typreceive;
3103
3105}
3106
3107
3108
3109
3110
3111
3112void
3114{
3117
3120 elog(ERROR, "cache lookup failed for type %u", type);
3122
3123 if (!pt->typisdefined)
3125 (errcode(ERRCODE_UNDEFINED_OBJECT),
3126 errmsg("type %s is only a shell",
3130 (errcode(ERRCODE_UNDEFINED_FUNCTION),
3131 errmsg("no binary output function available for type %s",
3133
3134 *typSend = pt->typsend;
3135 *typIsVarlena = (!pt->typbyval) && (pt->typlen == -1);
3136
3138}
3139
3140
3141
3142
3143
3144
3147{
3149
3152 {
3154 Oid result;
3155
3156 result = typtup->typmodin;
3158 return result;
3159 }
3160 else
3162}
3163
3164#ifdef NOT_USED
3165
3166
3167
3168
3169
3171get_typmodout(Oid typid)
3172{
3174
3177 {
3179 Oid result;
3180
3181 result = typtup->typmodout;
3183 return result;
3184 }
3185 else
3187}
3188#endif
3189
3190
3191
3192
3193
3194
3197{
3199
3202 {
3204 Oid result;
3205
3206 result = typtup->typcollation;
3208 return result;
3209 }
3210 else
3212}
3213
3214
3215
3216
3217
3218
3219
3220bool
3222{
3224}
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3238{
3240
3243 {
3245 RegProcedure handler = typform->typsubscript;
3246
3247 if (typelemp)
3248 *typelemp = typform->typelem;
3250 return handler;
3251 }
3252 else
3253 {
3254 if (typelemp)
3257 }
3258}
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3271{
3273
3275 return NULL;
3276
3279}
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3299{
3302
3304 {
3305 stawidth = (*get_attavgwidth_hook) (relid, attnum);
3306 if (stawidth > 0)
3307 return stawidth;
3308 }
3314 {
3317 if (stawidth > 0)
3318 return stawidth;
3319 }
3320 return 0;
3321}
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373bool
3375 int reqkind, Oid reqop, int flags)
3376{
3378 int i;
3381 Oid arrayelemtype;
3382 int narrayelem;
3385
3386
3388
3390 {
3391 if ((&stats->stakind1)[i] == reqkind &&
3392 (reqop == InvalidOid || (&stats->staop1)[i] == reqop))
3393 break;
3394 }
3396 return false;
3397
3398 sslot->staop = (&stats->staop1)[i];
3399 sslot->stacoll = (&stats->stacoll1)[i];
3400
3402 {
3404 Anum_pg_statistic_stavalues1 + i);
3405
3406
3407
3408
3409
3411
3412
3413
3414
3415
3417
3418
3421 elog(ERROR, "cache lookup failed for type %u", arrayelemtype);
3423
3424
3426 arrayelemtype,
3427 typeForm->typlen,
3428 typeForm->typbyval,
3429 typeForm->typalign,
3431
3432
3433
3434
3435
3436
3437
3438 if (!typeForm->typbyval)
3440 else
3441 pfree(statarray);
3442
3444 }
3445
3447 {
3449 Anum_pg_statistic_stanumbers1 + i);
3450
3451
3452
3453
3454
3456
3457
3458
3459
3460
3461
3462 narrayelem = ARR_DIMS(statarray)[0];
3463 if (ARR_NDIM(statarray) != 1 || narrayelem <= 0 ||
3466 elog(ERROR, "stanumbers is not a 1-D float4 array");
3467
3468
3470 sslot->nnumbers = narrayelem;
3471
3472
3474 }
3475
3476 return true;
3477}
3478
3479
3480
3481
3482
3483void
3485{
3486
3489
3490
3495}
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505char *
3507{
3509
3512 {
3514 char *result;
3515
3518 return result;
3519 }
3520 else
3521 return NULL;
3522}
3523
3524
3525
3526
3527
3528
3529char *
3531{
3533 return pstrdup("pg_temp");
3534 else
3536}
3537
3538
3539
3540
3541
3542
3543
3544
3545
3548{
3550
3553 {
3555 Oid result;
3556
3557 result = rngtup->rngsubtype;
3559 return result;
3560 }
3561 else
3563}
3564
3565
3566
3567
3568
3569
3570
3571
3574{
3576
3579 {
3581 Oid result;
3582
3583 result = rngtup->rngcollation;
3585 return result;
3586 }
3587 else
3589}
3590
3591
3592
3593
3594
3595
3596
3599{
3601
3604 {
3606 Oid result;
3607
3608 result = rngtup->rngmultitypid;
3610 return result;
3611 }
3612 else
3614}
3615
3616
3617
3618
3619
3620
3621
3624{
3626
3629 {
3631 Oid result;
3632
3633 result = rngtup->rngtypid;
3635 return result;
3636 }
3637 else
3639}
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3653{
3658 Oid opclass;
3659
3660
3661
3665
3667
3668
3669 Assert(attno > 0 && attno <= rd_index->indnatts);
3670
3671
3672 if (attno > rd_index->indnkeyatts)
3673 {
3676 }
3677
3680
3681 Assert(attno <= indclass->dim1);
3682 opclass = indclass->values[attno - 1];
3683
3685
3686 return opclass;
3687}
3688
3689
3690
3691
3692
3693
3694bool
3696{
3699 bool result;
3700
3703 return false;
3704
3706 result = rd_index->indisreplident;
3708
3709 return result;
3710}
3711
3712
3713
3714
3715
3716
3717bool
3719{
3720 bool isvalid;
3723
3726 elog(ERROR, "cache lookup failed for index %u", index_oid);
3727
3729 isvalid = rd_index->indisvalid;
3731
3732 return isvalid;
3733}
3734
3735
3736
3737
3738
3739
3740bool
3742{
3743 bool isclustered;
3746
3749 elog(ERROR, "cache lookup failed for index %u", index_oid);
3750
3752 isclustered = rd_index->indisclustered;
3754
3755 return isclustered;
3756}
3757
3758
3759
3760
3761
3762
3763
3766{
3767 Oid oid;
3768
3769 oid = GetSysCacheOid1(PUBLICATIONNAME, Anum_pg_publication_oid,
3771 if ((oid) && !missing_ok)
3773 (errcode(ERRCODE_UNDEFINED_OBJECT),
3774 errmsg("publication \"%s\" does not exist", pubname)));
3775 return oid;
3776}
3777
3778
3779
3780
3781
3782
3783
3784char *
3786{
3788 char *pubname;
3790
3792
3794 {
3795 if (!missing_ok)
3796 elog(ERROR, "cache lookup failed for publication %u", pubid);
3797 return NULL;
3798 }
3799
3802
3804
3805 return pubname;
3806}
3807
3808
3809
3810
3811
3812
3813
3816{
3817 Oid oid;
3818
3819 oid = GetSysCacheOid2(SUBSCRIPTIONNAME, Anum_pg_subscription_oid,
3821 if ((oid) && !missing_ok)
3823 (errcode(ERRCODE_UNDEFINED_OBJECT),
3824 errmsg("subscription \"%s\" does not exist", subname)));
3825 return oid;
3826}
3827
3828
3829
3830
3831
3832
3833
3834char *
3836{
3840
3842
3844 {
3845 if (!missing_ok)
3846 elog(ERROR, "cache lookup failed for subscription %u", subid);
3847 return NULL;
3848 }
3849
3852
3854
3856}
StrategyNumber IndexAmTranslateCompareType(CompareType cmptype, Oid amoid, Oid opfamily, bool missing_ok)
CompareType IndexAmTranslateStrategy(StrategyNumber strategy, Oid amoid, Oid opfamily, bool missing_ok)
IndexAmRoutine * GetIndexAmRoutineByAmId(Oid amoid, bool noerror)
#define DatumGetArrayTypePCopy(X)
void deconstruct_array(ArrayType *array, Oid elmtype, int elmlen, bool elmbyval, char elmalign, Datum **elemsp, bool **nullsp, int *nelemsp)
#define InvalidAttrNumber
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput)
#define TextDatumGetCString(d)
#define OidIsValid(objectId)
Datum datumCopy(Datum value, bool typByVal, int typLen)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)
#define OidFunctionCall0(functionId)
int32 type_maximum_size(Oid type_oid, int32 typemod)
char * format_type_be(Oid type_oid)
#define HASHSTANDARD_PROC
Assert(PointerIsAligned(start, uint64))
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * lappend(List *list, void *datum)
List * lappend_oid(List *list, Oid datum)
bool list_member_oid(const List *list, Oid datum)
Oid get_range_subtype(Oid rangeOid)
char * get_rel_name(Oid relid)
void get_op_opfamily_properties(Oid opno, Oid opfamily, bool ordering_op, int *strategy, Oid *lefttype, Oid *righttype)
Oid get_func_variadictype(Oid funcid)
Oid get_opclass_method(Oid opclass)
bool get_compatible_hash_operators(Oid opno, Oid *lhs_opno, Oid *rhs_opno)
bool get_rel_relispartition(Oid relid)
Oid get_op_opfamily_sortfamily(Oid opno, Oid opfamily)
char get_rel_persistence(Oid relid)
char get_func_prokind(Oid funcid)
bool get_index_isvalid(Oid index_oid)
Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok)
void getTypeBinaryOutputInfo(Oid type, Oid *typSend, bool *typIsVarlena)
AttrNumber get_attnum(Oid relid, const char *attname)
RegProcedure get_oprrest(Oid opno)
void free_attstatsslot(AttStatsSlot *sslot)
bool comparison_ops_are_compatible(Oid opno1, Oid opno2)
Oid get_constraint_index(Oid conoid)
bool get_func_retset(Oid funcid)
bool get_ordering_op_properties(Oid opno, Oid *opfamily, Oid *opcintype, CompareType *cmptype)
Oid get_element_type(Oid typid)
Oid get_opclass_input_type(Oid opclass)
bool type_is_rowtype(Oid typid)
bool type_is_range(Oid typid)
char func_parallel(Oid funcid)
Oid get_opclass_family(Oid opclass)
char get_attgenerated(Oid relid, AttrNumber attnum)
bool type_is_enum(Oid typid)
Oid get_multirange_range(Oid multirangeOid)
Oid get_typmodin(Oid typid)
Oid get_opfamily_member_for_cmptype(Oid opfamily, Oid lefttype, Oid righttype, CompareType cmptype)
char get_typstorage(Oid typid)
bool get_opclass_opfamily_and_input_type(Oid opclass, Oid *opfamily, Oid *opcintype)
RegProcedure get_func_support(Oid funcid)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
bool get_typisdefined(Oid typid)
char * get_opname(Oid opno)
Datum get_attoptions(Oid relid, int16 attnum)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
int32 get_attavgwidth(Oid relid, AttrNumber attnum)
bool get_index_isreplident(Oid index_oid)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
RegProcedure get_oprjoin(Oid opno)
Oid get_equality_op_for_ordering_op(Oid opno, bool *reverse)
bool op_hashjoinable(Oid opno, Oid inputtype)
char get_rel_relkind(Oid relid)
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
Oid get_func_signature(Oid funcid, Oid **argtypes, int *nargs)
Oid get_publication_oid(const char *pubname, bool missing_ok)
Oid get_rel_namespace(Oid relid)
static bool get_opmethod_canorder(Oid amoid)
RegProcedure get_opcode(Oid opno)
Oid get_typcollation(Oid typid)
Oid get_op_rettype(Oid opno)
int get_op_opfamily_strategy(Oid opno, Oid opfamily)
char * get_collation_name(Oid colloid)
Oid get_rel_type_id(Oid relid)
char * get_language_name(Oid langoid, bool missing_ok)
char * get_namespace_name_or_temp(Oid nspid)
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
char func_volatile(Oid funcid)
bool equality_ops_are_compatible(Oid opno1, Oid opno2)
get_attavgwidth_hook_type get_attavgwidth_hook
bool get_index_isclustered(Oid index_oid)
Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, int16 strategy)
Oid get_ordering_op_for_equality_op(Oid opno, bool use_lhs_type)
Oid get_transform_tosql(Oid typid, Oid langid, List *trftypes)
bool func_strict(Oid funcid)
Oid get_index_column_opclass(Oid index_oid, int attno)
char * get_constraint_name(Oid conoid)
char * get_attname(Oid relid, AttrNumber attnum, bool missing_ok)
bool get_func_leakproof(Oid funcid)
const struct SubscriptRoutines * getSubscriptingRoutines(Oid typid, Oid *typelemp)
Node * get_typdefault(Oid typid)
bool get_collation_isdeterministic(Oid colloid)
List * get_op_index_interpretation(Oid opno)
Oid get_subscription_oid(const char *subname, bool missing_ok)
char * get_subscription_name(Oid subid, bool missing_ok)
Oid get_range_collation(Oid rangeOid)
char * get_opfamily_name(Oid opfid, bool missing_ok)
char * get_func_name(Oid funcid)
Oid get_range_multirange(Oid rangeOid)
Oid get_rel_relam(Oid relid)
char op_volatile(Oid opno)
Oid get_func_namespace(Oid funcid)
bool type_is_collatable(Oid typid)
Oid get_rel_tablespace(Oid relid)
int get_func_nargs(Oid funcid)
void get_type_io_data(Oid typid, IOFuncSelector which_func, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *func)
int16 get_typlen(Oid typid)
Oid get_typ_typrelid(Oid typid)
char get_typtype(Oid typid)
Oid get_base_element_type(Oid typid)
Oid getTypeIOParam(HeapTuple typeTuple)
Oid get_opfamily_method(Oid opfid)
Oid getBaseTypeAndTypmod(Oid typid, int32 *typmod)
Oid get_transform_fromsql(Oid typid, Oid langid, List *trftypes)
char * get_publication_name(Oid pubid, bool missing_ok)
Oid getBaseType(Oid typid)
bool get_op_hash_functions(Oid opno, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
bool get_typbyval(Oid typid)
bool op_mergejoinable(Oid opno, Oid inputtype)
List * get_mergejoin_opfamilies(Oid opno)
char * get_namespace_name(Oid nspid)
Oid get_array_type(Oid typid)
Oid get_func_rettype(Oid funcid)
Oid get_promoted_array_type(Oid typid)
Oid get_atttype(Oid relid, AttrNumber attnum)
char get_constraint_type(Oid conoid)
int32 get_typavgwidth(Oid typid, int32 typmod)
bool op_in_opfamily(Oid opno, Oid opfamily)
RegProcedure get_typsubscript(Oid typid, Oid *typelemp)
void get_type_category_preferred(Oid typid, char *typcategory, bool *typispreferred)
bool get_attstatsslot(AttStatsSlot *sslot, HeapTuple statstuple, int reqkind, Oid reqop, int flags)
Oid get_relname_relid(const char *relname, Oid relnamespace)
Oid get_negator(Oid opno)
Oid get_commutator(Oid opno)
void op_input_types(Oid opno, Oid *lefttype, Oid *righttype)
bool type_is_multirange(Oid typid)
void getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typIOParam)
void get_atttypetypmodcoll(Oid relid, AttrNumber attnum, Oid *typid, int32 *typmod, Oid *collid)
#define ATTSTATSSLOT_NUMBERS
#define ATTSTATSSLOT_VALUES
int32(* get_attavgwidth_hook_type)(Oid relid, AttrNumber attnum)
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
char * pstrdup(const char *in)
void pfree(void *pointer)
#define IsBootstrapProcessingMode()
bool isTempNamespace(Oid namespaceId)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
FormData_pg_attribute * Form_pg_attribute
FormData_pg_class * Form_pg_class
FormData_pg_collation * Form_pg_collation
FormData_pg_constraint * Form_pg_constraint
FormData_pg_index * Form_pg_index
FormData_pg_language * Form_pg_language
FormData_pg_namespace * Form_pg_namespace
FormData_pg_opclass * Form_pg_opclass
FormData_pg_operator * Form_pg_operator
FormData_pg_opfamily * Form_pg_opfamily
FormData_pg_proc * Form_pg_proc
FormData_pg_publication * Form_pg_publication
FormData_pg_range * Form_pg_range
#define STATISTIC_NUM_SLOTS
FormData_pg_statistic * Form_pg_statistic
FormData_pg_subscription * Form_pg_subscription
FormData_pg_transform * Form_pg_transform
FormData_pg_type * Form_pg_type
static Datum PointerGetDatum(const void *X)
static Datum Int16GetDatum(int16 X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum CharGetDatum(char X)
void * stringToNode(const char *str)
#define HTEqualStrategyNumber
bool amconsistentordering
bool amconsistentequality
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
Oid values[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
HeapTuple SearchSysCache3(int cacheId, Datum key1, Datum key2, Datum key3)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
HeapTuple SearchSysCache2(int cacheId, Datum key1, Datum key2)
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
HeapTuple SearchSysCache4(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
#define ReleaseSysCacheList(x)
#define SearchSysCacheList1(cacheId, key1)
#define SearchSysCacheExists3(cacheId, key1, key2, key3)
#define GetSysCacheOid1(cacheId, oidcol, key1)
#define GetSysCacheOid2(cacheId, oidcol, key1, key2)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
#define TYPECACHE_CMP_PROC
#define TYPECACHE_HASH_PROC