mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -1779,6 +1779,18 @@ _equalImportForeignSchemaStmt(const ImportForeignSchemaStmt *a, const ImportFore
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateTransformStmt(const CreateTransformStmt *a, const CreateTransformStmt *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(replace);
|
||||
COMPARE_NODE_FIELD(type_name);
|
||||
COMPARE_STRING_FIELD(lang);
|
||||
COMPARE_NODE_FIELD(fromsql);
|
||||
COMPARE_NODE_FIELD(tosql);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
|
||||
{
|
||||
@@ -2991,6 +3003,9 @@ equal(const void *a, const void *b)
|
||||
case T_ImportForeignSchemaStmt:
|
||||
retval = _equalImportForeignSchemaStmt(a, b);
|
||||
break;
|
||||
case T_CreateTransformStmt:
|
||||
retval = _equalCreateTransformStmt(a, b);
|
||||
break;
|
||||
case T_CreateTrigStmt:
|
||||
retval = _equalCreateTrigStmt(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user