From 97377048b460823a300b1d414203c5f09c8efc1b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 18 Jul 2002 23:11:32 +0000 Subject: 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. --- src/include/nodes/nodes.h | 4 +++- src/include/nodes/parsenodes.h | 28 +++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'src/include/nodes') 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 */ -- cgit v1.2.3