42{
48 bool nulls[Natts_pg_conversion];
52 referenced;
53
54
55 if (!conname)
56 elog(
ERROR,
"no conversion name supplied");
57
58
64 errmsg(
"conversion \"%s\" already exists", conname)));
65
66 if (def)
67 {
68
69
70
71
73 conforencoding,
74 contoencoding))
77 errmsg(
"default conversion for %s to %s already exists",
80 }
81
82
85
86
87 for (
i = 0;
i < Natts_pg_conversion;
i++)
88 {
91 }
92
93
96 Anum_pg_conversion_oid);
105
107
108
110
111 myself.
classId = ConversionRelationId;
114
115
116 referenced.
classId = ProcedureRelationId;
120
121
122 referenced.
classId = NamespaceRelationId;
126
127
129
130
132
133
135
138
139 return myself;
140}
static Datum values[MAXATTR]
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void namestrcpy(Name name, const char *str)
#define InvokeObjectPostCreateHook(classId, objectId, subId)
Oid FindDefaultConversion(Oid name_space, int32 for_encoding, int32 to_encoding)
void recordDependencyOn(const ObjectAddress *depender, const ObjectAddress *referenced, DependencyType behavior)
void recordDependencyOnCurrentExtension(const ObjectAddress *object, bool isReplace)
void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
#define pg_encoding_to_char
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum NameGetDatum(const NameData *X)
static Datum Int32GetDatum(int32 X)
#define ERRCODE_DUPLICATE_OBJECT
#define SearchSysCacheExists2(cacheId, key1, key2)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)