Definition at line 195 of file pg_type.c.
227{
240
241
242
243
244
245
246
247
253 errmsg(
"invalid type internal size %d",
255
257 {
258
259
260
261
262
263
265 {
269 errmsg(
"alignment \"%c\" is invalid for passed-by-value type of size %d",
271 }
273 {
277 errmsg(
"alignment \"%c\" is invalid for passed-by-value type of size %d",
279 }
281 {
285 errmsg(
"alignment \"%c\" is invalid for passed-by-value type of size %d",
287 }
289 {
293 errmsg(
"alignment \"%c\" is invalid for passed-by-value type of size %d",
295 }
296 else
299 errmsg(
"internal size %d is invalid for passed-by-value type",
301 }
302 else
303 {
304
309 errmsg(
"alignment \"%c\" is invalid for variable-length type",
311
315 errmsg(
"alignment \"%c\" is invalid for variable-length type",
317 }
318
319
323 errmsg(
"fixed-size types must have storage PLAIN")));
324
325
326
327
328
329
330
331
332
336
337
338
339
341 {
345 }
346
347
348
349
379
380
381
382
383
386 else
388
389
390
391
394 else
396
397
398
399
402 else
407 else
409
410
411
412
413
414
415
417
422 {
424
425
426
427
428
432 errmsg(
"type \"%s\" already exists", typeName)));
433
434
435
436
437 if (
typform->typowner != ownerId)
439
440
442 elog(
ERROR,
"cannot assign new OID to existing shell type");
443
445
446
447
448
452 nulls,
454
456
458
460 }
461 else
462 {
463
466
468 {
472 errmsg(
"pg_type OID value not set when in binary upgrade mode")));
473
476 }
477 else
478 {
481 }
482
484
487
489 }
490
491
492
493
506
507
509
511
512
513
514
516
517 return address;
518}
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
Acl * get_user_default_acl(ObjectType objtype, Oid ownerId, Oid nsp_oid)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, const Datum *replValues, const bool *replIsnull, const bool *doReplace)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
#define IsBootstrapProcessingMode()
#define InvokeObjectPostCreateHook(classId, objectId, subId)
void GenerateTypeDependencies(HeapTuple typeTuple, Relation typeCatalog, Node *defaultExpr, void *typacl, char relationKind, bool isImplicitArray, bool isDependentType, bool makeExtensionDep, bool rebuild)
Oid binary_upgrade_next_pg_type_oid
static Datum PointerGetDatum(const void *X)
static Datum Int16GetDatum(int16 X)
static Datum BoolGetDatum(bool X)
static Datum NameGetDatum(const NameData *X)
static Datum Int32GetDatum(int32 X)
static Datum CharGetDatum(char X)
#define SearchSysCacheCopy2(cacheId, key1, key2)
References aclcheck_error(), ACLCHECK_NOT_OWNER, binary_upgrade_next_pg_type_oid, BoolGetDatum(), CatalogTupleInsert(), CatalogTupleUpdate(), CharGetDatum(), CStringGetDatum(), CStringGetTextDatum, elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), GenerateTypeDependencies(), get_user_default_acl(), GetNewOidWithIndex(), GETSTRUCT(), heap_form_tuple(), heap_modify_tuple(), HeapTupleIsValid, i, Int16GetDatum(), Int32GetDatum(), InvalidOid, InvokeObjectPostCreateHook, IsBinaryUpgrade, IsBootstrapProcessingMode, name, NameGetDatum(), namestrcpy(), OBJECT_TYPE, ObjectAddressSet, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy2, storage, stringToNode(), table_close(), table_open(), and values.
Referenced by AddNewRelationType(), DefineDomain(), DefineEnum(), DefineRange(), DefineType(), and heap_create_with_catalog().