mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +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:
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.303 2007/03/27 23:21:09 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.304 2007/04/02 03:49:38 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1186,6 +1186,15 @@ _equalCompositeTypeStmt(CompositeTypeStmt *a, CompositeTypeStmt *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateEnumStmt(CreateEnumStmt *a, CreateEnumStmt *b)
|
||||
{
|
||||
COMPARE_NODE_FIELD(typename);
|
||||
COMPARE_NODE_FIELD(vals);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalViewStmt(ViewStmt *a, ViewStmt *b)
|
||||
{
|
||||
@@ -2247,6 +2256,9 @@ equal(void *a, void *b)
|
||||
case T_CompositeTypeStmt:
|
||||
retval = _equalCompositeTypeStmt(a, b);
|
||||
break;
|
||||
case T_CreateEnumStmt:
|
||||
retval = _equalCreateEnumStmt(a, b);
|
||||
break;
|
||||
case T_ViewStmt:
|
||||
retval = _equalViewStmt(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user