summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
authorAlvaro Herrera2015-06-26 21:17:54 +0000
committerAlvaro Herrera2015-06-26 21:17:54 +0000
commit7d60b2af34842ae89b1abdd31fb5d303bd43c514 (patch)
tree73fd808ab5ec9c45bd4de98ec8cbf46bec812a90 /src/test/modules
parent402822246866e1094d35a617775a65b4be93d322 (diff)
Fix DDL command collection for TRANSFORM
Commit b488c580ae, which added the DDL command collection feature, neglected to update the code that commit cac76582053e had previously added two weeks earlier for the TRANSFORM feature. Reported by Michael Paquier.
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/test_ddl_deparse/Makefile1
-rw-r--r--src/test/modules/test_ddl_deparse/expected/create_transform.out13
-rw-r--r--src/test/modules/test_ddl_deparse/sql/create_transform.sql14
3 files changed, 28 insertions, 0 deletions
diff --git a/src/test/modules/test_ddl_deparse/Makefile b/src/test/modules/test_ddl_deparse/Makefile
index 13b985a2963..8ea6f39afd2 100644
--- a/src/test/modules/test_ddl_deparse/Makefile
+++ b/src/test/modules/test_ddl_deparse/Makefile
@@ -15,6 +15,7 @@ REGRESS = test_ddl_deparse \
create_domain \
create_sequence_1 \
create_table \
+ create_transform \
alter_table \
create_view \
create_trigger \
diff --git a/src/test/modules/test_ddl_deparse/expected/create_transform.out b/src/test/modules/test_ddl_deparse/expected/create_transform.out
new file mode 100644
index 00000000000..0d1cc360f4e
--- /dev/null
+++ b/src/test/modules/test_ddl_deparse/expected/create_transform.out
@@ -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;
diff --git a/src/test/modules/test_ddl_deparse/sql/create_transform.sql b/src/test/modules/test_ddl_deparse/sql/create_transform.sql
new file mode 100644
index 00000000000..096870233f8
--- /dev/null
+++ b/src/test/modules/test_ddl_deparse/sql/create_transform.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;