summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorPeter Eisentraut2002-07-18 23:11:32 +0000
committerPeter Eisentraut2002-07-18 23:11:32 +0000
commit97377048b460823a300b1d414203c5f09c8efc1b (patch)
tree7c567e9728b214a10604afa1aa923d02a683156e /src/include/nodes
parenta345ac8842089cbca1678d5b28773a827937693f (diff)
pg_cast table, and standards-compliant CREATE/DROP CAST commands, plus
extension to create binary compatible casts. Includes dependency tracking as well. pg_proc.proimplicit is now defunct, but will be removed in a separate commit. pg_dump provides a migration path from the previous scheme to declare casts. Dumping binary compatible casts is currently impossible, though.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/nodes.h4
-rw-r--r--src/include/nodes/parsenodes.h28
2 files changed, 30 insertions, 2 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 308bf95877..3583315a27 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.112 2002/07/18 17:14:20 momjian Exp $
+ * $Id: nodes.h,v 1.113 2002/07/18 23:11:32 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -199,6 +199,8 @@ typedef enum NodeTag
T_AlterDatabaseSetStmt,
T_AlterUserSetStmt,
T_CreateConversionStmt,
+ T_CreateCastStmt,
+ T_DropCastStmt,
T_A_Expr = 700,
T_ColumnRef,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index b2e42ab716..e4c6b625d1 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.192 2002/07/18 17:14:20 momjian Exp $
+ * $Id: parsenodes.h,v 1.193 2002/07/18 23:11:32 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1555,4 +1555,30 @@ typedef struct CreateConversionStmt
bool def; /* is this a default conversion? */
} CreateConversionStmt;
+/* ----------------------
+ * CREATE CAST Statement
+ * ----------------------
+ */
+typedef struct CreateCastStmt
+{
+ NodeTag type;
+ TypeName *sourcetype;
+ TypeName *targettype;
+ FuncWithArgs *func;
+ bool implicit;
+} CreateCastStmt;
+
+/* ----------------------
+ * DROP CAST Statement
+ * ----------------------
+ */
+typedef struct DropCastStmt
+{
+ NodeTag type;
+ TypeName *sourcetype;
+ TypeName *targettype;
+ DropBehavior behavior;
+} DropCastStmt;
+
+
#endif /* PARSENODES_H */