Исходный код СУБД 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
/*-------------------------------------------------------------------------
 *
 * pg_replication_origin.h
 *    definition of the "replication origin" system catalog
 *    (pg_replication_origin)
 *
 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/catalog/pg_replication_origin.h
 *
 * NOTES
 *    The Catalog.pm module reads this file and derives schema
 *    information.
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_REPLICATION_ORIGIN_H
#define PG_REPLICATION_ORIGIN_H
 
#include "access/xlogdefs.h"
#include "catalog/genbki.h"
#include "catalog/pg_replication_origin_d.h"    /* IWYU pragma: export */
 
/* ----------------
 *      pg_replication_origin.  cpp turns this into
 *      typedef struct FormData_pg_replication_origin
 * ----------------
 */
BEGIN_CATALOG_STRUCT
 
CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION
{
    /*
     * Locally known id that get included into WAL.
     *
     * This should never leave the system.
     *
     * Needs to fit into an uint16, so we don't waste too much space in WAL
     * records. For this reason we don't use a normal Oid column here, since
     * we need to handle allocation of new values manually.
     */
    Oid         roident;
 
    /*
     * Variable-length fields start here, but we allow direct access to
     * roname.
     */
 
    /* external, free-format, name */
    text        roname BKI_FORCE_NOT_NULL;
 
#ifdef CATALOG_VARLEN           /* further variable-length fields */
#endif
} FormData_pg_replication_origin;
 
END_CATALOG_STRUCT
 
typedef FormData_pg_replication_origin *Form_pg_replication_origin;
 
DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, ReplicationOriginIdentIndex, pg_replication_origin, btree(roident oid_ops));
DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, ReplicationOriginNameIndex, pg_replication_origin, btree(roname text_ops));
 
MAKE_SYSCACHE(REPLORIGIDENT, pg_replication_origin_roiident_index, 16);
MAKE_SYSCACHE(REPLORIGNAME, pg_replication_origin_roname_index, 16);
 
#endif                          /* PG_REPLICATION_ORIGIN_H */