2002-12-06 06:00:34 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
2002-12-10 17:12:53 +01:00
|
|
|
* typecmds.h
|
|
|
|
* prototypes for typecmds.c.
|
2002-12-06 06:00:34 +01:00
|
|
|
*
|
|
|
|
*
|
2008-01-01 20:46:01 +01:00
|
|
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
2002-12-06 06:00:34 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2008-03-19 19:38:30 +01:00
|
|
|
* $PostgreSQL: pgsql/src/include/commands/typecmds.h,v 1.23 2008/03/19 18:38:30 tgl Exp $
|
2002-12-06 06:00:34 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef TYPECMDS_H
|
|
|
|
#define TYPECMDS_H
|
|
|
|
|
2002-12-10 17:12:53 +01:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
|
2003-01-06 01:31:45 +01:00
|
|
|
|
2002-12-10 17:12:53 +01:00
|
|
|
#define DEFAULT_TYPDELIM ','
|
|
|
|
|
2002-12-06 06:00:34 +01:00
|
|
|
extern void DefineType(List *names, List *parameters);
|
2005-11-19 18:39:45 +01:00
|
|
|
extern void RemoveType(List *names, DropBehavior behavior, bool missing_ok);
|
2002-12-06 06:00:34 +01:00
|
|
|
extern void RemoveTypeById(Oid typeOid);
|
|
|
|
extern void DefineDomain(CreateDomainStmt *stmt);
|
2005-11-19 18:39:45 +01:00
|
|
|
extern void RemoveDomain(List *names, DropBehavior behavior, bool missing_ok);
|
2007-11-15 23:25:18 +01:00
|
|
|
extern void DefineEnum(CreateEnumStmt *stmt);
|
2002-12-06 06:00:34 +01:00
|
|
|
extern Oid DefineCompositeType(const RangeVar *typevar, List *coldeflist);
|
|
|
|
|
|
|
|
extern void AlterDomainDefault(List *names, Node *defaultRaw);
|
|
|
|
extern void AlterDomainNotNull(List *names, bool notNull);
|
|
|
|
extern void AlterDomainAddConstraint(List *names, Node *constr);
|
|
|
|
extern void AlterDomainDropConstraint(List *names, const char *constrName,
|
2003-08-04 02:43:34 +02:00
|
|
|
DropBehavior behavior);
|
2002-12-06 06:00:34 +01:00
|
|
|
|
2003-02-03 22:15:45 +01:00
|
|
|
extern List *GetDomainConstraints(Oid typeOid);
|
|
|
|
|
2008-03-19 19:38:30 +01:00
|
|
|
extern void RenameType(List *names, const char *newTypeName);
|
2005-06-28 07:09:14 +02:00
|
|
|
extern void AlterTypeOwner(List *names, Oid newOwnerId);
|
Support arrays of composite types, including the rowtypes of regular tables
and views (but not system catalogs, nor sequences or toast tables). Get rid
of the hardwired convention that a type's array type is named exactly "_type",
instead using a new column pg_type.typarray to provide the linkage. (It still
will be named "_type", though, except in odd corner cases such as
maximum-length type names.)
Along the way, make tracking of owner and schema dependencies for types more
uniform: a type directly created by the user has these dependencies, while a
table rowtype or auto-generated array type does not have them, but depends on
its parent object instead.
David Fetter, Andrew Dunstan, Tom Lane
2007-05-11 19:57:14 +02:00
|
|
|
extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
|
2007-11-15 22:14:46 +01:00
|
|
|
bool hasDependEntry);
|
2005-08-01 06:03:59 +02:00
|
|
|
extern void AlterTypeNamespace(List *names, const char *newschema);
|
|
|
|
extern void AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid,
|
2007-11-15 22:14:46 +01:00
|
|
|
bool isImplicitArray,
|
|
|
|
bool errorOnTableType);
|
2003-01-06 01:31:45 +01:00
|
|
|
|
2002-12-06 06:00:34 +01:00
|
|
|
#endif /* TYPECMDS_H */
|