PostgreSQL Source Code  git master
pg_conversion.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_conversion.h
4  * definition of the "conversion" system catalog (pg_conversion)
5  *
6  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/catalog/pg_conversion.h
10  *
11  * NOTES
12  * The Catalog.pm module reads this file and derives schema
13  * information.
14  *
15  *-------------------------------------------------------------------------
16  */
17 #ifndef PG_CONVERSION_H
18 #define PG_CONVERSION_H
19 
20 #include "catalog/genbki.h"
21 #include "catalog/objectaddress.h"
22 #include "catalog/pg_conversion_d.h"
23 
24 /* ----------------
25  * pg_conversion definition. cpp turns this into
26  * typedef struct FormData_pg_conversion
27  * ----------------
28  */
29 CATALOG(pg_conversion,2607,ConversionRelationId)
30 {
31  /* oid */
32  Oid oid;
33 
34  /* name of the conversion */
35  NameData conname;
36 
37  /* namespace that the conversion belongs to */
38  Oid connamespace BKI_DEFAULT(PGNSP);
39 
40  /* owner of the conversion */
41  Oid conowner BKI_DEFAULT(PGUID);
42 
43  /* FOR encoding id */
44  int32 conforencoding BKI_LOOKUP(encoding);
45 
46  /* TO encoding id */
47  int32 contoencoding BKI_LOOKUP(encoding);
48 
49  /* OID of the conversion proc */
50  regproc conproc BKI_LOOKUP(pg_proc);
51 
52  /* true if this is a default conversion */
53  bool condefault BKI_DEFAULT(t);
55 
56 /* ----------------
57  * Form_pg_conversion corresponds to a pointer to a tuple with
58  * the format of pg_conversion relation.
59  * ----------------
60  */
62 
63 
64 extern ObjectAddress ConversionCreate(const char *conname, Oid connamespace,
65  Oid conowner,
66  int32 conforencoding, int32 contoencoding,
67  Oid conproc, bool def);
68 extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding,
69  int32 to_encoding);
70 
71 #endif /* PG_CONVERSION_H */
FormData_pg_conversion
Definition: pg_conversion.h:54
unsigned int Oid
Definition: postgres_ext.h:31
#define BKI_DEFAULT(value)
Definition: genbki.h:35
signed int int32
Definition: c.h:362
Oid FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding)
Definition: c.h:616
#define BKI_LOOKUP(catalog)
Definition: genbki.h:42
FormData_pg_conversion * Form_pg_conversion
Definition: pg_conversion.h:61
CATALOG(pg_conversion, 2607, ConversionRelationId)
Definition: pg_conversion.h:29
int32 encoding
Definition: pg_database.h:41
Oid regproc
Definition: c.h:517
ObjectAddress ConversionCreate(const char *conname, Oid connamespace, Oid conowner, int32 conforencoding, int32 contoencoding, Oid conproc, bool def)
Definition: pg_conversion.c:41