PostgreSQL Source Code  git master
pg_user_mapping.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_user_mapping.h
4  * definition of the "user mapping" system catalog (pg_user_mapping)
5  *
6  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/catalog/pg_user_mapping.h
10  *
11  * NOTES
12  * The Catalog.pm module reads this file and derives schema
13  * information.
14  *
15  *-------------------------------------------------------------------------
16  */
17 #ifndef PG_USER_MAPPING_H
18 #define PG_USER_MAPPING_H
19 
20 #include "catalog/genbki.h"
21 #include "catalog/pg_user_mapping_d.h"
22 
23 /* ----------------
24  * pg_user_mapping definition. cpp turns this into
25  * typedef struct FormData_pg_user_mapping
26  * ----------------
27  */
28 CATALOG(pg_user_mapping,1418,UserMappingRelationId)
29 {
30  Oid oid; /* oid */
31 
32  Oid umuser BKI_LOOKUP_OPT(pg_authid); /* Id of the user,
33  * InvalidOid if PUBLIC is
34  * wanted */
35  Oid umserver BKI_LOOKUP(pg_foreign_server); /* server of this
36  * mapping */
37 
38 #ifdef CATALOG_VARLEN /* variable-length fields start here */
39  text umoptions[1]; /* user mapping options */
40 #endif
42 
43 /* ----------------
44  * Form_pg_user_mapping corresponds to a pointer to a tuple with
45  * the format of pg_user_mapping relation.
46  * ----------------
47  */
49 
50 DECLARE_TOAST(pg_user_mapping, 4173, 4174);
51 
52 DECLARE_UNIQUE_INDEX_PKEY(pg_user_mapping_oid_index, 174, UserMappingOidIndexId, pg_user_mapping, btree(oid oid_ops));
53 DECLARE_UNIQUE_INDEX(pg_user_mapping_user_server_index, 175, UserMappingUserServerIndexId, pg_user_mapping, btree(umuser oid_ops, umserver oid_ops));
54 
55 MAKE_SYSCACHE(USERMAPPINGOID, pg_user_mapping_oid_index, 2);
56 MAKE_SYSCACHE(USERMAPPINGUSERSERVER, pg_user_mapping_user_server_index, 2);
57 
58 #endif /* PG_USER_MAPPING_H */
#define BKI_LOOKUP(catalog)
Definition: genbki.h:46
#define BKI_LOOKUP_OPT(catalog)
Definition: genbki.h:47
FormData_pg_user_mapping * Form_pg_user_mapping
MAKE_SYSCACHE(USERMAPPINGOID, pg_user_mapping_oid_index, 2)
FormData_pg_user_mapping
DECLARE_TOAST(pg_user_mapping, 4173, 4174)
DECLARE_UNIQUE_INDEX_PKEY(pg_user_mapping_oid_index, 174, UserMappingOidIndexId, pg_user_mapping, btree(oid oid_ops))
CATALOG(pg_user_mapping, 1418, UserMappingRelationId)
DECLARE_UNIQUE_INDEX(pg_user_mapping_user_server_index, 175, UserMappingUserServerIndexId, pg_user_mapping, btree(umuser oid_ops, umserver oid_ops))
unsigned int Oid
Definition: postgres_ext.h:31
Definition: c.h:687