1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

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
This commit is contained in:
Peter Eisentraut
2015-04-26 10:33:14 -04:00
parent f320cbb615
commit cac7658205
101 changed files with 6034 additions and 2811 deletions

View File

@@ -3625,6 +3625,20 @@ _copyImportForeignSchemaStmt(const ImportForeignSchemaStmt *from)
return newnode;
}
static CreateTransformStmt *
_copyCreateTransformStmt(const CreateTransformStmt *from)
{
CreateTransformStmt *newnode = makeNode(CreateTransformStmt);
COPY_SCALAR_FIELD(replace);
COPY_NODE_FIELD(type_name);
COPY_STRING_FIELD(lang);
COPY_NODE_FIELD(fromsql);
COPY_NODE_FIELD(tosql);
return newnode;
}
static CreateTrigStmt *
_copyCreateTrigStmt(const CreateTrigStmt *from)
{
@@ -4568,6 +4582,9 @@ copyObject(const void *from)
case T_ImportForeignSchemaStmt:
retval = _copyImportForeignSchemaStmt(from);
break;
case T_CreateTransformStmt:
retval = _copyCreateTransformStmt(from);
break;
case T_CreateTrigStmt:
retval = _copyCreateTrigStmt(from);
break;