Fix DDL command collection for TRANSFORM
Commitb488c580ae
, which added the DDL command collection feature, neglected to update the code that commitcac7658205
had previously added two weeks earlier for the TRANSFORM feature. Reported by Michael Paquier.
This commit is contained in:
parent
4028222468
commit
7d60b2af34
|
@ -1740,7 +1740,7 @@ check_transform_function(Form_pg_proc procstruct)
|
|||
/*
|
||||
* CREATE TRANSFORM
|
||||
*/
|
||||
Oid
|
||||
ObjectAddress
|
||||
CreateTransform(CreateTransformStmt *stmt)
|
||||
{
|
||||
Oid typeid;
|
||||
|
@ -1938,7 +1938,7 @@ CreateTransform(CreateTransformStmt *stmt)
|
|||
|
||||
heap_close(relation, RowExclusiveLock);
|
||||
|
||||
return transformid;
|
||||
return myself;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1438,7 +1438,7 @@ ProcessUtilitySlow(Node *parsetree,
|
|||
break;
|
||||
|
||||
case T_CreateTransformStmt:
|
||||
CreateTransform((CreateTransformStmt *) parsetree);
|
||||
address = CreateTransform((CreateTransformStmt *) parsetree);
|
||||
break;
|
||||
|
||||
case T_AlterOpFamilyStmt:
|
||||
|
|
|
@ -51,7 +51,7 @@ extern void SetFunctionArgType(Oid funcOid, int argIndex, Oid newArgType);
|
|||
extern ObjectAddress AlterFunction(AlterFunctionStmt *stmt);
|
||||
extern ObjectAddress CreateCast(CreateCastStmt *stmt);
|
||||
extern void DropCastById(Oid castOid);
|
||||
extern Oid CreateTransform(CreateTransformStmt *stmt);
|
||||
extern ObjectAddress CreateTransform(CreateTransformStmt *stmt);
|
||||
extern void DropTransformById(Oid transformOid);
|
||||
extern void IsThereFunctionInNamespace(const char *proname, int pronargs,
|
||||
oidvector *proargtypes, Oid nspOid);
|
||||
|
|
|
@ -15,6 +15,7 @@ REGRESS = test_ddl_deparse \
|
|||
create_domain \
|
||||
create_sequence_1 \
|
||||
create_table \
|
||||
create_transform \
|
||||
alter_table \
|
||||
create_view \
|
||||
create_trigger \
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
--
|
||||
-- CREATE_TRANSFORM
|
||||
--
|
||||
-- Create a dummy transform
|
||||
-- The function FROM SQL should have internal as single argument as well
|
||||
-- as return type. The function TO SQL should have as single argument
|
||||
-- internal and as return argument the datatype of the transform done.
|
||||
-- pl/plpgsql does not authorize the use of internal as data type.
|
||||
CREATE TRANSFORM FOR int LANGUAGE SQL (
|
||||
FROM SQL WITH FUNCTION varchar_transform(internal),
|
||||
TO SQL WITH FUNCTION int4recv(internal));
|
||||
NOTICE: DDL test: type simple, tag CREATE TRANSFORM
|
||||
DROP TRANSFORM FOR int LANGUAGE SQL;
|
|
@ -0,0 +1,14 @@
|
|||
--
|
||||
-- CREATE_TRANSFORM
|
||||
--
|
||||
|
||||
-- Create a dummy transform
|
||||
-- The function FROM SQL should have internal as single argument as well
|
||||
-- as return type. The function TO SQL should have as single argument
|
||||
-- internal and as return argument the datatype of the transform done.
|
||||
-- pl/plpgsql does not authorize the use of internal as data type.
|
||||
CREATE TRANSFORM FOR int LANGUAGE SQL (
|
||||
FROM SQL WITH FUNCTION varchar_transform(internal),
|
||||
TO SQL WITH FUNCTION int4recv(internal));
|
||||
|
||||
DROP TRANSFORM FOR int LANGUAGE SQL;
|
Loading…
Reference in New Issue