summaryrefslogtreecommitdiff
path: root/src/backend/nodes/equalfuncs.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-03-06 20:35:02 +0000
committerBruce Momjian <bruce@momjian.us>2002-03-06 20:35:02 +0000
commit01c76f7411c24b11e4ab36a9fe5f5017dc33be78 (patch)
tree279d40bc7e04a02e9cd9124ff0f21a79deb50e90 /src/backend/nodes/equalfuncs.c
parent3d9f865e94b2e7b926ef083dd555ecc7d33bccf9 (diff)
Ok. Updated patch attached.
- domain.patch -> source patch against pgsql in cvs - drop_domain.sgml and create_domain.sgml -> New doc/src/sgml/ref docs - dominfo.txt -> basic domain related queries I used for testing [ ADDED TO /doc] Enables domains of array elements -> CREATE DOMAIN dom int4[3][2]; Uses a typbasetype column to describe the origin of the domain. Copies data to attnotnull rather than processing in execMain(). Some documentation differences from earlier. If this is approved, I'll start working on pg_dump, and a \dD <domain> option in psql, and regression tests. I don't really feel like doing those until the system table structure settles for pg_type. CHECKS when added, will also be copied to to the table attributes. FK Constraints (if I ever figure out how) will be done similarly. Both will lbe handled by MergeDomainAttributes() which is called shortly before MergeAttributes(). Rod Taylor
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r--src/backend/nodes/equalfuncs.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 661190dbaa8..962471a5a97 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -20,7 +20,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.113 2002/03/06 06:09:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.114 2002/03/06 20:34:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1096,6 +1096,17 @@ _equalLoadStmt(LoadStmt *a, LoadStmt *b)
}
static bool
+_equalCreateDomainStmt(CreateDomainStmt *a, CreateDomainStmt *b)
+{
+ if (!equalstr(a->domainname, b->domainname))
+ return false;
+ if (!equal(a->typename, b->typename))
+ return false;
+
+ return true;
+}
+
+static bool
_equalCreatedbStmt(CreatedbStmt *a, CreatedbStmt *b)
{
if (!equalstr(a->dbname, b->dbname))
@@ -2011,6 +2022,9 @@ equal(void *a, void *b)
case T_LoadStmt:
retval = _equalLoadStmt(a, b);
break;
+ case T_CreateDomainStmt:
+ retval = _equalCreateDomainStmt(a, b);
+ break;
case T_CreatedbStmt:
retval = _equalCreatedbStmt(a, b);
break;