summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
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/include/nodes/parsenodes.h
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/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c6b1feb79b9..330a3bd3598 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.156 2002/03/05 05:33:31 momjian Exp $
+ * $Id: parsenodes.h,v 1.157 2002/03/06 20:35:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -468,12 +468,14 @@ typedef struct DefineStmt
#define DROP_INDEX 4
#define DROP_RULE 5
#define DROP_TYPE_P 6
+#define DROP_DOMAIN_P 7
typedef struct DropStmt
{
NodeTag type;
List *names;
int removeType;
+ int behavior; /* CASCADE or RESTRICT drop behavior */
} DropStmt;
/* ----------------------
@@ -682,6 +684,7 @@ typedef struct LoadStmt
char *filename; /* file to load */
} LoadStmt;
+
/* ----------------------
* Createdb Statement
* ----------------------
@@ -1281,6 +1284,22 @@ typedef struct DefElem
/****************************************************************************
+ * Nodes for a Domain Creation tree
+ ****************************************************************************/
+/* ----------------------
+ * CreateDomain Statement
+ * ----------------------
+ * Down here as it required TypeName to be defined first.
+ */
+typedef struct CreateDomainStmt
+{
+ NodeTag type;
+ char *domainname; /* name of domain to create */
+ TypeName *typename; /* the typecast */
+ List *constraints; /* constraints (list of Constraint nodes) */
+} CreateDomainStmt;
+
+/****************************************************************************
* Nodes for a Query tree
****************************************************************************/