You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix parse tree of DROP TRANSFORM and COMMENT ON TRANSFORM
The plain C string language name needs to be wrapped in makeString() so
that the parse tree is copyable. This is detectable by
-DCOPY_PARSE_PLAN_TREES. Add a test case for the COMMENT case.
Also make the quoting in the error messages more consistent.
discovered by Tom Lane
Copy file name to clipboardExpand all lines: contrib/hstore_plperl/expected/create_transform.out
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,22 @@ CREATE TRANSFORM FOR hstore LANGUAGE plperl (FROM SQL WITH FUNCTION internal_in(
23
23
ERROR: first argument of transform function must be type "internal"
24
24
CREATE TRANSFORM FOR hstore LANGUAGE plperl (FROM SQL WITH FUNCTION hstore_to_plperl(internal), TO SQL WITH FUNCTION plperl_to_hstore(internal)); -- ok
25
25
CREATE TRANSFORM FOR hstore LANGUAGE plperl (FROM SQL WITH FUNCTION hstore_to_plperl(internal), TO SQL WITH FUNCTION plperl_to_hstore(internal)); -- fail
26
-
ERROR: transform for type hstore language plperl already exists
26
+
ERROR: transform for type hstore language "plperl" already exists
27
27
CREATE OR REPLACE TRANSFORM FOR hstore LANGUAGE plperl (FROM SQL WITH FUNCTION hstore_to_plperl(internal), TO SQL WITH FUNCTION plperl_to_hstore(internal)); -- ok
28
28
CREATE OR REPLACE TRANSFORM FOR hstore LANGUAGE plperl (FROM SQL WITH FUNCTION hstore_to_plperl(internal)); -- ok
29
29
CREATE OR REPLACE TRANSFORM FOR hstore LANGUAGE plperl (TO SQL WITH FUNCTION plperl_to_hstore(internal)); -- ok
30
+
COMMENT ON TRANSFORM FOR hstore LANGUAGE plperl IS 'test';
30
31
DROP TRANSFORM IF EXISTS FOR fake_type LANGUAGE plperl;
31
32
NOTICE: type "fake_type" does not exist, skipping
32
33
DROP TRANSFORM IF EXISTS FOR hstore LANGUAGE fake_lang;
33
-
NOTICE: transform for type hstore language fake_lang does not exist, skipping
34
+
NOTICE: transform for type hstore language "fake_lang" does not exist, skipping
34
35
DROP TRANSFORM FOR foo LANGUAGE plperl;
35
36
ERROR: type "foo" does not exist
36
37
DROP TRANSFORM FOR hstore LANGUAGE foo;
37
38
ERROR: language "foo" does not exist
38
39
DROP TRANSFORM FOR hstore LANGUAGE plperl;
39
40
DROP TRANSFORM IF EXISTS FOR hstore LANGUAGE plperl;
40
-
NOTICE: transform for type hstore language plperl does not exist, skipping
41
+
NOTICE: transform for type hstore language "plperl" does not exist, skipping
0 commit comments