PostgreSQL Source Code  git master
pg_foreign_server.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_foreign_server.h
4  * definition of the "foreign server" system catalog (pg_foreign_server)
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_foreign_server.h
10  *
11  * NOTES
12  * The Catalog.pm module reads this file and derives schema
13  * information.
14  *
15  *-------------------------------------------------------------------------
16  */
17 #ifndef PG_FOREIGN_SERVER_H
18 #define PG_FOREIGN_SERVER_H
19 
20 #include "catalog/genbki.h"
21 #include "catalog/pg_foreign_server_d.h"
22 
23 /* ----------------
24  * pg_foreign_server definition. cpp turns this into
25  * typedef struct FormData_pg_foreign_server
26  * ----------------
27  */
28 CATALOG(pg_foreign_server,1417,ForeignServerRelationId)
29 {
30  Oid oid; /* oid */
31  NameData srvname; /* foreign server name */
32  Oid srvowner BKI_LOOKUP(pg_authid); /* server owner */
33  Oid srvfdw BKI_LOOKUP(pg_foreign_data_wrapper); /* server FDW */
34 
35 #ifdef CATALOG_VARLEN /* variable-length fields start here */
36  text srvtype;
37  text srvversion;
38  aclitem srvacl[1]; /* access permissions */
39  text srvoptions[1]; /* FDW-specific options */
40 #endif
42 
43 /* ----------------
44  * Form_pg_foreign_server corresponds to a pointer to a tuple with
45  * the format of pg_foreign_server relation.
46  * ----------------
47  */
49 
50 DECLARE_TOAST(pg_foreign_server, 4151, 4152);
51 
52 DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_server_oid_index, 113, ForeignServerOidIndexId, pg_foreign_server, btree(oid oid_ops));
53 DECLARE_UNIQUE_INDEX(pg_foreign_server_name_index, 549, ForeignServerNameIndexId, pg_foreign_server, btree(srvname name_ops));
54 
55 MAKE_SYSCACHE(FOREIGNSERVEROID, pg_foreign_server_oid_index, 2);
56 MAKE_SYSCACHE(FOREIGNSERVERNAME, pg_foreign_server_name_index, 2);
57 
58 #endif /* PG_FOREIGN_SERVER_H */
#define BKI_LOOKUP(catalog)
Definition: genbki.h:46
DECLARE_TOAST(pg_foreign_server, 4151, 4152)
FormData_pg_foreign_server
MAKE_SYSCACHE(FOREIGNSERVEROID, pg_foreign_server_oid_index, 2)
DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_server_oid_index, 113, ForeignServerOidIndexId, pg_foreign_server, btree(oid oid_ops))
FormData_pg_foreign_server * Form_pg_foreign_server
CATALOG(pg_foreign_server, 1417, ForeignServerRelationId)
DECLARE_UNIQUE_INDEX(pg_foreign_server_name_index, 549, ForeignServerNameIndexId, pg_foreign_server, btree(srvname name_ops))
unsigned int Oid
Definition: postgres_ext.h:31
Definition: c.h:695
Definition: c.h:641