Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*-------------------------------------------------------------------------
 *
 * pg_range.h
 *    definition of the "range type" system catalog (pg_range)
 *
 *
 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/catalog/pg_range.h
 *
 * NOTES
 *    The Catalog.pm module reads this file and derives schema
 *    information.
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_RANGE_H
#define PG_RANGE_H
 
#include "catalog/genbki.h"
#include "catalog/pg_range_d.h" /* IWYU pragma: export */
 
/* ----------------
 *      pg_range definition.  cpp turns this into
 *      typedef struct FormData_pg_range
 * ----------------
 */
BEGIN_CATALOG_STRUCT
 
CATALOG(pg_range,3541,RangeRelationId)
{
    /* OID of owning range type */
    Oid         rngtypid BKI_LOOKUP(pg_type);
 
    /* OID of range's element type (subtype) */
    Oid         rngsubtype BKI_LOOKUP(pg_type);
 
    /* OID of the range's multirange type */
    Oid         rngmultitypid BKI_LOOKUP(pg_type);
 
    /* collation for this range type, or 0 */
    Oid         rngcollation BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_collation);
 
    /* subtype's btree opclass */
    Oid         rngsubopc BKI_LOOKUP(pg_opclass);
 
    /* range constructor functions */
    regproc     rngconstruct2 BKI_LOOKUP(pg_proc);
    regproc     rngconstruct3 BKI_LOOKUP(pg_proc);
 
    /* multirange constructor functions */
    regproc     rngmltconstruct0 BKI_LOOKUP(pg_proc);
    regproc     rngmltconstruct1 BKI_LOOKUP(pg_proc);
    regproc     rngmltconstruct2 BKI_LOOKUP(pg_proc);
 
    /* canonicalize range, or 0 */
    regproc     rngcanonical BKI_LOOKUP_OPT(pg_proc);
 
    /* subtype difference as a float8, or 0 */
    regproc     rngsubdiff BKI_LOOKUP_OPT(pg_proc);
} FormData_pg_range;
 
END_CATALOG_STRUCT
 
/* ----------------
 *      Form_pg_range corresponds to a pointer to a tuple with
 *      the format of pg_range relation.
 * ----------------
 */
typedef FormData_pg_range *Form_pg_range;
 
DECLARE_UNIQUE_INDEX_PKEY(pg_range_rngtypid_index, 3542, RangeTypidIndexId, pg_range, btree(rngtypid oid_ops));
DECLARE_UNIQUE_INDEX(pg_range_rngmultitypid_index, 2228, RangeMultirangeTypidIndexId, pg_range, btree(rngmultitypid oid_ops));
 
MAKE_SYSCACHE(RANGETYPE, pg_range_rngtypid_index, 4);
MAKE_SYSCACHE(RANGEMULTIRANGE, pg_range_rngmultitypid_index, 4);
 
/*
 * prototypes for functions in pg_range.c
 */
 
extern void RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation,
                        Oid rangeSubOpclass, RegProcedure rangeCanonical,
                        RegProcedure rangeSubDiff, Oid multirangeTypeOid,
                        RegProcedure rangeConstruct2, RegProcedure rangeConstruct3,
                        RegProcedure mltrngConstruct0, RegProcedure mltrngConstruct1, RegProcedure mltrngConstruct2);
extern void RangeDelete(Oid rangeTypeOid);
 
#endif                          /* PG_RANGE_H */