summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
authorPeter Eisentraut2015-04-26 14:33:14 +0000
committerPeter Eisentraut2015-04-26 14:33:14 +0000
commitcac76582053ef8ea07df65fed0757f352da23705 (patch)
tree6ae01041aa61db9d686638b9d4c3ccd30d7c6487 /src/include/nodes/parsenodes.h
parentf320cbb615e0374b18836337713239da58705cf3 (diff)
Add transforms feature
This provides a mechanism for specifying conversions between SQL data types and procedural languages. As examples, there are transforms for hstore and ltree for PL/Perl and PL/Python. reviews by Pavel Stěhule and Andres Freund
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 36e36d56316..852eb4fbdc9 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1265,6 +1265,7 @@ typedef enum ObjectType
OBJECT_TABCONSTRAINT,
OBJECT_TABLE,
OBJECT_TABLESPACE,
+ OBJECT_TRANSFORM,
OBJECT_TRIGGER,
OBJECT_TSCONFIGURATION,
OBJECT_TSDICTIONARY,
@@ -2790,6 +2791,20 @@ typedef struct CreateCastStmt
} CreateCastStmt;
/* ----------------------
+ * CREATE TRANSFORM Statement
+ * ----------------------
+ */
+typedef struct CreateTransformStmt
+{
+ NodeTag type;
+ bool replace;
+ TypeName *type_name;
+ char *lang;
+ FuncWithArgs *fromsql;
+ FuncWithArgs *tosql;
+} CreateTransformStmt;
+
+/* ----------------------
* PREPARE Statement
* ----------------------
*/