mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Support enum data types. Along the way, use macros for the values of
pg_type.typtype whereever practical. Tom Dunstan, with some kibitzing from Tom Lane.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.372 2007/03/27 23:21:09 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.373 2007/04/02 03:49:38 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2361,6 +2361,17 @@ _copyCompositeTypeStmt(CompositeTypeStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static CreateEnumStmt *
|
||||
_copyCreateEnumStmt(CreateEnumStmt *from)
|
||||
{
|
||||
CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
|
||||
|
||||
COPY_NODE_FIELD(typename);
|
||||
COPY_NODE_FIELD(vals);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static ViewStmt *
|
||||
_copyViewStmt(ViewStmt *from)
|
||||
{
|
||||
@ -3312,6 +3323,9 @@ copyObject(void *from)
|
||||
case T_CompositeTypeStmt:
|
||||
retval = _copyCompositeTypeStmt(from);
|
||||
break;
|
||||
case T_CreateEnumStmt:
|
||||
retval = _copyCreateEnumStmt(from);
|
||||
break;
|
||||
case T_ViewStmt:
|
||||
retval = _copyViewStmt(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user