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  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_conversion.h
11  *
12  * NOTES
13  * The Catalog.pm module reads this file and derives schema
14  * information.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_CONVERSION_H
19 #define PG_CONVERSION_H
20 
21 #include "catalog/genbki.h"
22 #include "catalog/pg_conversion_d.h"
23 
24 #include "catalog/objectaddress.h"
25 
26 /* ----------------------------------------------------------------
27  * pg_conversion definition.
28  *
29  * cpp turns this into typedef struct FormData_pg_namespace
30  *
31  * conname name of the conversion
32  * connamespace name space which the conversion belongs to
33  * conowner owner of the conversion
34  * conforencoding FOR encoding id
35  * contoencoding TO encoding id
36  * conproc OID of the conversion proc
37  * condefault true if this is a default conversion
38  * ----------------------------------------------------------------
39  */
40 CATALOG(pg_conversion,2607,ConversionRelationId)
41 {
42  NameData conname;
43  Oid connamespace;
44  Oid conowner;
45  int32 conforencoding;
46  int32 contoencoding;
47  regproc conproc;
48  bool condefault;
50 
51 /* ----------------
52  * Form_pg_conversion corresponds to a pointer to a tuple with
53  * the format of pg_conversion relation.
54  * ----------------
55  */
57 
58 
59 extern ObjectAddress ConversionCreate(const char *conname, Oid connamespace,
60  Oid conowner,
61  int32 conforencoding, int32 contoencoding,
62  Oid conproc, bool def);
63 extern void RemoveConversionById(Oid conversionOid);
64 extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding,
65  int32 to_encoding);
66 
67 #endif /* PG_CONVERSION_H */
FormData_pg_conversion
Definition: pg_conversion.h:49
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:313
Oid FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding)
Definition: c.h:570
FormData_pg_conversion * Form_pg_conversion
Definition: pg_conversion.h:56
void RemoveConversionById(Oid conversionOid)
CATALOG(pg_conversion, 2607, ConversionRelationId)
Definition: pg_conversion.h:40
Oid regproc
Definition: c.h:471
ObjectAddress ConversionCreate(const char *conname, Oid connamespace, Oid conowner, int32 conforencoding, int32 contoencoding, Oid conproc, bool def)
Definition: pg_conversion.c:40