diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 5d903d047ef02d4ccc36c772230ee9c5540cfb84..9bd2a22a012aee1f07586050badd9faccc16c201 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -4220,8 +4220,7 @@ static Node* grouped_window_mutator(Node *node, void *context) ereport(ERROR, (errcode(ERRCODE_WINDOWING_ERROR), errmsg("unresolved grouping key in window query"), - errhint("You may need to use explicit aliases and/or to refer to grouping " - "keys in the same way throughout the query."))); + errhint("You might need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query."))); } else { diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 2e1d91870369f3bbc5bd182776c59d3263227e76..df9a50db43d7c53c6e8c405e4cb047764053045e 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -2389,7 +2389,7 @@ transformPercentileExpr(ParseState *pstate, PercentileExpr *p) errmsg("function \"%s\" does not exist", percentileFuncString(p, &argtype, 1, NULL, 0)), errhint("No function matches the given name and argument types. " - "You may need to add explicit type casts."))); + "You might need to add explicit type casts."))); } argtype = FLOAT8OID; @@ -2523,7 +2523,7 @@ transformPercentileExpr(ParseState *pstate, PercentileExpr *p) errmsg("function \"%s\" is not unique", percentileFuncString(p, &argtype, 1, sorttypes, sortlen)), errhint("Could not choose a best candidate function. " - "You may need to add explicit type casts."))); + "You might need to add explicit type casts."))); } else if (ncandidates == 0) { @@ -2532,7 +2532,7 @@ transformPercentileExpr(ParseState *pstate, PercentileExpr *p) errmsg("function \"%s\" does not exist", percentileFuncString(p, &argtype, 1, sorttypes, sortlen)), errhint("No function matches the given name and argument types. " - "You may need to add explicit type casts."))); + "You might need to add explicit type casts."))); } p->perctype = candidates->args[0]; diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 6d832830eadf6097ad2c62d38f8b1618980595fb..c6db5d0e26244ee86fbf2d56356c9458cc05357b 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -345,7 +345,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, errmsg("function %s() does not exist", NameListToString(funcname)), errhint("No function matches the given name and argument types. " - "You may need to add explicit type casts."), + "You might need to add explicit type casts."), parser_errposition(pstate, location))); } diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out index d9a62322d76e598b2c6c24deb2d25f1d467faada..1be8cde7b5d681ac6e21ef2c70470c685ce986b8 100755 --- a/src/test/regress/expected/aggregates.out +++ b/src/test/regress/expected/aggregates.out @@ -708,25 +708,25 @@ select array_agg(distinct a,b,c order by i) ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by i) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,b,c order by a,b+1) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by a,b+1) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,b,c order by a,b,i,c) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by a,b,i,c) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,a,c order by a,b) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,a,c order by a,b) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- string_agg tests select string_agg(a) from (values('aaaa'),('bbbb'),('cccc')) g(a); string_agg @@ -798,12 +798,12 @@ SELECT a(aggtest order by a) from aggtest; -- function-like column reference ERROR: function a(aggtest) does not exist LINE 1: SELECT a(aggtest order by a) from aggtest; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT nosuchagg(a order by a) FROM aggtest; -- no such function ERROR: function nosuchagg(smallint) does not exist LINE 1: SELECT nosuchagg(a order by a) FROM aggtest; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT lag(a order by a) from aggtest; -- window function (no window clause) ERROR: ORDER BY specified, but lag is not an ordered aggregate function LINE 1: SELECT lag(a order by a) from aggtest; diff --git a/src/test/regress/expected/aggregates_optimizer.out b/src/test/regress/expected/aggregates_optimizer.out index c9bc03f72581d8490a296e0885373b47bdf80f80..5a08309a8ed9a0c68e7e4139722fdae010ec94a7 100644 --- a/src/test/regress/expected/aggregates_optimizer.out +++ b/src/test/regress/expected/aggregates_optimizer.out @@ -714,25 +714,25 @@ select array_agg(distinct a,b,c order by i) ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by i) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,b,c order by a,b+1) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by a,b+1) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,b,c order by a,b,i,c) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,b,c order by a,b,i,c) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select array_agg(distinct a,a,c order by a,b) from (values (1,1,'foo')) v(a,b,c), generate_series(1,2) i; ERROR: function array_agg(integer, integer, text) does not exist LINE 1: select array_agg(distinct a,a,c order by a,b) ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- string_agg tests select string_agg(a) from (values('aaaa'),('bbbb'),('cccc')) g(a); string_agg @@ -804,12 +804,12 @@ SELECT a(aggtest order by a) from aggtest; -- function-like column reference ERROR: function a(aggtest) does not exist LINE 1: SELECT a(aggtest order by a) from aggtest; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT nosuchagg(a order by a) FROM aggtest; -- no such function ERROR: function nosuchagg(smallint) does not exist LINE 1: SELECT nosuchagg(a order by a) FROM aggtest; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT lag(a order by a) from aggtest; -- window function (no window clause) ERROR: ORDER BY specified, but lag is not an ordered aggregate function LINE 1: SELECT lag(a order by a) from aggtest; diff --git a/src/test/regress/expected/decode_expr.out b/src/test/regress/expected/decode_expr.out index 58bc207b26b698e0c01c63f046f4f351c038c2cc..421f377964c8a7fc249487046cbc1a397782b047 100644 --- a/src/test/regress/expected/decode_expr.out +++ b/src/test/regress/expected/decode_expr.out @@ -899,7 +899,7 @@ select decode(true, false); ERROR: function decode(boolean, boolean) does not exist LINE 1: select decode(true, false); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select decode(2); ERROR: syntax error at or near ")" LINE 1: select decode(2); diff --git a/src/test/regress/expected/default_parameters.out b/src/test/regress/expected/default_parameters.out index 3e415f188f3dc76800a220df8c487fb0fc902836..63889b5b9aefe1046674e89d8b363e9794967f6b 100644 --- a/src/test/regress/expected/default_parameters.out +++ b/src/test/regress/expected/default_parameters.out @@ -26,7 +26,7 @@ select dfunc(10, 20, 30); -- fail ERROR: function dfunc(integer, integer, integer) does not exist LINE 1: select dfunc(10, 20, 30); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. drop function dfunc(); -- fail ERROR: function dfunc() does not exist drop function dfunc(int); -- fail @@ -93,7 +93,7 @@ select dfunc(); -- fail: which dfunc should be called? int or text ERROR: function dfunc() is not unique LINE 1: select dfunc(); ^ -HINT: Could not choose a best candidate function. You may need to add explicit type casts. +HINT: Could not choose a best candidate function. You might need to add explicit type casts. select dfunc('Hi'); -- ok dfunc ----------- @@ -136,17 +136,17 @@ select dfunc(); -- fail ERROR: function dfunc() is not unique LINE 1: select dfunc(); ^ -HINT: Could not choose a best candidate function. You may need to add explicit type casts. +HINT: Could not choose a best candidate function. You might need to add explicit type casts. select dfunc(1); -- fail ERROR: function dfunc(integer) is not unique LINE 1: select dfunc(1); ^ -HINT: Could not choose a best candidate function. You may need to add explicit type casts. +HINT: Could not choose a best candidate function. You might need to add explicit type casts. select dfunc(1, 2); -- fail ERROR: function dfunc(integer, integer) is not unique LINE 1: select dfunc(1, 2); ^ -HINT: Could not choose a best candidate function. You may need to add explicit type casts. +HINT: Could not choose a best candidate function. You might need to add explicit type casts. select dfunc(1, 2, 3); -- ok dfunc ------- @@ -199,7 +199,7 @@ select dfunc(); -- fail ERROR: function dfunc() does not exist LINE 1: select dfunc(); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select dfunc(10); dfunc ------- diff --git a/src/test/regress/expected/filter.out b/src/test/regress/expected/filter.out index 990e2d94e5cc358929d938bcfd2efcf732ec3466..944beabe3b6d9bad8421909f97e64de28e6439e2 100644 --- a/src/test/regress/expected/filter.out +++ b/src/test/regress/expected/filter.out @@ -118,12 +118,12 @@ SELECT max(*) FROM filter_test; ERROR: function max() does not exist LINE 1: SELECT max(*) FROM filter_test; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT max(*) FILTER (WHERE i < 5) FROM filter_test; ERROR: function max() does not exist LINE 1: SELECT max(*) FILTER (WHERE i < 5) FROM filter_test; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Use old sort implementation set gp_enable_mk_sort=off; --- TEST MAX(i) @@ -445,7 +445,7 @@ FROM filter_test ORDER BY j, i; ERROR: function row_number(integer) does not exist LINE 1: select i, j, row_number() filter (WHERE i % 2 = 1) over (par... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select i, rank() over (order by i) from filter_test ORDER BY i; i | rank ----+------ @@ -465,7 +465,7 @@ select i, rank() filter (where true) over (order by i) from filter_test ORDER BY ERROR: function rank(integer) does not exist LINE 1: select i, rank() filter (where true) over (order by i) from ... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select i, ntile(3) over (order by i) from filter_test ORDER BY i; i | ntile ----+------- @@ -546,19 +546,19 @@ select i(t) filter (where true) from (select maketuple() as t) x order by i(t); ERROR: function i(filter_test) does not exist LINE 1: select i(t) filter (where true) from (select maketuple() as ... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. drop function maketuple(); --- TEST non-exsistant function => same error select chocolate(i) from filter_test; ERROR: function chocolate(integer) does not exist LINE 1: select chocolate(i) from filter_test; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select chocolate(i) filter (where true) from filter_test; ERROR: function chocolate(integer) does not exist LINE 1: select chocolate(i) filter (where true) from filter_test; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. --- TEST filter from outside scope => error select * from (select i from filter_test where j = 1) x1, (select sum(i) filter (where i < x1.i) from filter_test where j = 2) x2; diff --git a/src/test/regress/expected/olap_window.out b/src/test/regress/expected/olap_window.out index bf496295268b920975aad35b9ef44e3a35e2f29b..dd317ca6d7b4c9f1887e0bd78e25093fec89d290 100755 --- a/src/test/regress/expected/olap_window.out +++ b/src/test/regress/expected/olap_window.out @@ -8162,7 +8162,7 @@ group by 2*b.g, lower(f); ERROR: unresolved grouping key in window query -HINT: You may need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. +HINT: You might need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. -- End MPP-12082 -- MPP-13802 select lag(x) over (w) diff --git a/src/test/regress/expected/olap_window_optimizer.out b/src/test/regress/expected/olap_window_optimizer.out index 4958811d35c7e2cd664412cc40ee79ffdaec6787..090d7fb11781139c4513b4e1c5012dcb43a2f731 100644 --- a/src/test/regress/expected/olap_window_optimizer.out +++ b/src/test/regress/expected/olap_window_optimizer.out @@ -8162,7 +8162,7 @@ group by 2*b.g, lower(f); ERROR: unresolved grouping key in window query -HINT: You may need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. +HINT: You might need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. -- End MPP-12082 -- MPP-13802 select lag(x) over (w) diff --git a/src/test/regress/expected/olap_window_seq.out b/src/test/regress/expected/olap_window_seq.out index 8446fa440c15d9b58828758e65a2923eccce1174..821cb62784abd0b017f9ec16569f6433c5a89219 100755 --- a/src/test/regress/expected/olap_window_seq.out +++ b/src/test/regress/expected/olap_window_seq.out @@ -8016,7 +8016,7 @@ group by 2*b.g, lower(f); ERROR: unresolved grouping key in window query -HINT: You may need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. +HINT: You might need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. -- End MPP-12082 -- MPP-12913 select count(*) over (partition by 1 order by cn rows between 1 preceding and 1 preceding) from sale; diff --git a/src/test/regress/expected/olap_window_seq_optimizer.out b/src/test/regress/expected/olap_window_seq_optimizer.out index 761b9913d29f778acef26648317d6a92f6096919..cee520a50eef8cb8dbfdb171e3fcbfc6f4674418 100644 --- a/src/test/regress/expected/olap_window_seq_optimizer.out +++ b/src/test/regress/expected/olap_window_seq_optimizer.out @@ -8022,7 +8022,7 @@ group by 2*b.g, lower(f); ERROR: unresolved grouping key in window query -HINT: You may need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. +HINT: You might need to use explicit aliases and/or to refer to grouping keys in the same way throughout the query. -- End MPP-12082 -- MPP-12913 select count(*) over (partition by 1 order by cn rows between 1 preceding and 1 preceding) from sale; diff --git a/src/test/regress/expected/percentile.out b/src/test/regress/expected/percentile.out index 21d3a6eafb7e4f22b26cc90dd28449ecafa77ba4..4139e0125954c27dcd8c46024ba11763dca4202e 100644 --- a/src/test/regress/expected/percentile.out +++ b/src/test/regress/expected/percentile.out @@ -1079,17 +1079,17 @@ select median('text') from perct; ERROR: function "median(unknown)" is not unique LINE 1: select median('text') from perct; ^ -HINT: Could not choose a best candidate function. You may need to add explicit type casts. +HINT: Could not choose a best candidate function. You might need to add explicit type casts. select percentile_cont(now()) within group (order by a) from percts; ERROR: function "percentile_cont(timestamp with time zone)" does not exist LINE 1: select percentile_cont(now()) within group (order by a) from... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select percentile_cont(0.5) within group (order by point(0,0)) from perct; ERROR: function "percentile_cont(double precision) ORDER BY (point)" does not exist LINE 1: ...elect percentile_cont(0.5) within group (order by point(0,0)... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- outer reference is not allowed for now select (select a from perct where median(t.a) = 5) from perct t; ERROR: percentile functions cannot reference columns from outer queries diff --git a/src/test/regress/expected/timeseries.out b/src/test/regress/expected/timeseries.out index 5d6eb9a174a944fb51b39afa65eda8f83db39e5c..59cf77b74b08c376a3ad3d7e2c5cee8a2964944c 100644 --- a/src/test/regress/expected/timeseries.out +++ b/src/test/regress/expected/timeseries.out @@ -393,7 +393,7 @@ select linear_interpolate(5, 0, 'y0'::text, 100, 'y1'::text); ERROR: function linear_interpolate(integer, integer, text, integer, text) does not exist LINE 1: select linear_interpolate(5, 0, 'y0'::text, 100, 'y1'::text)... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Check that "divide by zero" returns null select linear_interpolate('2010-01-03T02:00:00'::timestamp, '2010-01-02T09:20:00'::timestamp, 2000::int4, '2010-01-02T09:20:00'::timestamp, 2250::int4); linear_interpolate diff --git a/src/test/regress/expected/variadic_parameters.out b/src/test/regress/expected/variadic_parameters.out index 84049900572019dd6ff6acc29d9bc10715f2d705..aa88f5347ac59619ca1aabb3e58fe556cda29542 100644 --- a/src/test/regress/expected/variadic_parameters.out +++ b/src/test/regress/expected/variadic_parameters.out @@ -31,7 +31,7 @@ select myleast(); -- fail ERROR: function myleast() does not exist LINE 1: select myleast(); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- test with variadic call parameter select myleast(variadic array[1,2,3,4,-1]); myleast @@ -92,7 +92,7 @@ create view print_name as select concat(' ',id, fname, lname) from people; -- fa ERROR: function concat(unknown, integer, character varying, character varying) does not exist LINE 1: create view print_name as select concat(' ',id, fname, lname... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. create view print_name as select concat(' ', fname, lname) from people where id < 790; select * from print_name; concat @@ -138,17 +138,17 @@ select formarray(1.1, array[1.2,55.5]); -- fail without variadic ERROR: function formarray(numeric, numeric[]) does not exist LINE 1: select formarray(1.1, array[1.2,55.5]); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select formarray(1, 'x'::text); -- fail, type mismatch ERROR: function formarray(integer, text) does not exist LINE 1: select formarray(1, 'x'::text); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. select formarray(1, variadic array['x'::text]); -- fail, type mismatch ERROR: function formarray(integer, text[]) does not exist LINE 1: select formarray(1, variadic array['x'::text]); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. drop function formarray(anyelement, variadic anyarray); -- PLPGSQL -- test variadic functions diff --git a/src/test/regress/output/table_functions.source b/src/test/regress/output/table_functions.source index 6198ab238e49e8ec76eaee8aa89e12045d38941c..bdd15f0c33d43cf9a7b4e32cf6d1c36e9d079854 100644 --- a/src/test/regress/output/table_functions.source +++ b/src/test/regress/output/table_functions.source @@ -316,12 +316,12 @@ SELECT scalar_1(TABLE(select 1)); -- TableValue expression does not match type ERROR: function scalar_1(anytable) does not exist LINE 1: SELECT scalar_1(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT scalar_5(TABLE(select 1)); -- TableValue shouldn't match "anyelement" ERROR: function scalar_5(anytable) does not exist LINE 1: SELECT scalar_5(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Normal scalar input / table output functions -- begin equivalent */ SELECT row(a+5, b)::example from example; @@ -746,12 +746,12 @@ SELECT scalar_tf_1(TABLE(select 1)); -- TableValue expression does not match ty ERROR: function scalar_tf_1(anytable) does not exist LINE 1: SELECT scalar_tf_1(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT scalar_tf_6(TABLE(select 1)); -- TableValue expression does not anyelement ERROR: function scalar_tf_6(anytable) does not exist LINE 1: SELECT scalar_tf_6(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Table Functions table input / table output -- begin equivalent SELECT * FROM example order by a, b; @@ -1363,7 +1363,7 @@ SELECT * from nameres(TABLE(SELECT 5)); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * from nameres(TABLE(SELECT 5)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. CREATE FUNCTION nameres(anytable) RETURNS int AS '@abs_srcdir@/regress.so', 'multiset_scalar_value' LANGUAGE C READS SQL DATA; SELECT * from nameres(5); -- should work @@ -1383,7 +1383,7 @@ SELECT * from nameres(5); -- should fail ERROR: function nameres(integer) does not exist LINE 1: SELECT * from nameres(5); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT * from nameres(TABLE(SELECT 5)); -- should work nameres --------- @@ -1395,12 +1395,12 @@ SELECT * from nameres(5); -- should fail ERROR: function nameres(integer) does not exist LINE 1: SELECT * from nameres(5); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT * from nameres(TABLE(SELECT 5)); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * from nameres(TABLE(SELECT 5)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Error: anytable does NOT match anyelement CREATE FUNCTION nameres(anyelement) returns int AS $$ SELECT $1 $$ LANGUAGE SQL CONTAINS SQL; @@ -1408,7 +1408,7 @@ SELECT * FROM nameres( TABLE( SELECT 1) ); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * FROM nameres( TABLE( SELECT 1) ); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. DROP FUNCTION nameres(anyelement); -- Must support resjunk scatter by clauses explain SELECT * FROM multiset_5( TABLE( SELECT * FROM example SCATTER BY a+1) ); @@ -2046,7 +2046,7 @@ SELECT multiset_2( (SELECT a from example) ); -- not a TableValue expressi ERROR: function multiset_2(integer) does not exist LINE 1: SELECT multiset_2( (SELECT a from example) ); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT multiset_2( TABLE(SELECT * from example) ); -- not in the from clause ERROR: table functions must be invoked in FROM clause SELECT multiset_3( TABLE(SELECT a from example) ); -- not in the from clause @@ -2878,12 +2878,12 @@ SELECT extract(day from id) FROM project( TABLE( SELECT * FROM history ), 1); ERROR: function pg_catalog.date_part(unknown, integer) does not exist LINE 1: SELECT extract(day from id) FROM project( TABLE( SELECT * FR... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT "time"+1 FROM project( TABLE( SELECT * FROM history ), 2); ERROR: operator does not exist: timestamp without time zone + integer LINE 1: SELECT "time"+1 FROM project( TABLE( SELECT * FROM history )... ^ -HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. +HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. -- ERROR: select columns projected out by the function SELECT id FROM project( TABLE( SELECT * FROM history ), 2); ERROR: column "id" does not exist @@ -3074,7 +3074,7 @@ PREPARE p2 AS SELECT * FROM multiset_2( $1 ) order by a, b; ERROR: function multiset_2(unknown) does not exist LINE 1: PREPARE p2 AS SELECT * FROM multiset_2( $1 ) order by a, b; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. PREPARE p3(anytable) AS SELECT * FROM multiset_5( $1 ) order by a, b; ERROR: type "anytable" is not a valid parameter for PREPARE -- FAIL: $1 is not a constant diff --git a/src/test/regress/output/table_functions_optimizer.source b/src/test/regress/output/table_functions_optimizer.source index bc3474f08c5a6889e61fb8b17563fab2c9274c8e..14f039062346ef9a3361c3bb41b71c72adc57320 100644 --- a/src/test/regress/output/table_functions_optimizer.source +++ b/src/test/regress/output/table_functions_optimizer.source @@ -317,12 +317,12 @@ SELECT scalar_1(TABLE(select 1)); -- TableValue expression does not match type ERROR: function scalar_1(anytable) does not exist LINE 1: SELECT scalar_1(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT scalar_5(TABLE(select 1)); -- TableValue shouldn't match "anyelement" ERROR: function scalar_5(anytable) does not exist LINE 1: SELECT scalar_5(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Normal scalar input / table output functions -- begin equivalent */ SELECT row(a+5, b)::example from example; @@ -747,12 +747,12 @@ SELECT scalar_tf_1(TABLE(select 1)); -- TableValue expression does not match ty ERROR: function scalar_tf_1(anytable) does not exist LINE 1: SELECT scalar_tf_1(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT scalar_tf_6(TABLE(select 1)); -- TableValue expression does not anyelement ERROR: function scalar_tf_6(anytable) does not exist LINE 1: SELECT scalar_tf_6(TABLE(select 1)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Table Functions table input / table output -- begin equivalent SELECT * FROM example order by a, b; @@ -1364,7 +1364,7 @@ SELECT * from nameres(TABLE(SELECT 5)); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * from nameres(TABLE(SELECT 5)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. CREATE FUNCTION nameres(anytable) RETURNS int AS '@abs_srcdir@/regress.so', 'multiset_scalar_value' LANGUAGE C READS SQL DATA; SELECT * from nameres(5); -- should work @@ -1384,7 +1384,7 @@ SELECT * from nameres(5); -- should fail ERROR: function nameres(integer) does not exist LINE 1: SELECT * from nameres(5); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT * from nameres(TABLE(SELECT 5)); -- should work nameres --------- @@ -1396,12 +1396,12 @@ SELECT * from nameres(5); -- should fail ERROR: function nameres(integer) does not exist LINE 1: SELECT * from nameres(5); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT * from nameres(TABLE(SELECT 5)); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * from nameres(TABLE(SELECT 5)); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. -- Error: anytable does NOT match anyelement CREATE FUNCTION nameres(anyelement) returns int AS $$ SELECT $1 $$ LANGUAGE SQL CONTAINS SQL; @@ -1409,7 +1409,7 @@ SELECT * FROM nameres( TABLE( SELECT 1) ); -- should fail ERROR: function nameres(anytable) does not exist LINE 1: SELECT * FROM nameres( TABLE( SELECT 1) ); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. DROP FUNCTION nameres(anyelement); -- Must support resjunk scatter by clauses explain SELECT * FROM multiset_5( TABLE( SELECT * FROM example SCATTER BY a+1) ); @@ -2047,7 +2047,7 @@ SELECT multiset_2( (SELECT a from example) ); -- not a TableValue expressi ERROR: function multiset_2(integer) does not exist LINE 1: SELECT multiset_2( (SELECT a from example) ); ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT multiset_2( TABLE(SELECT * from example) ); -- not in the from clause ERROR: table functions must be invoked in FROM clause SELECT multiset_3( TABLE(SELECT a from example) ); -- not in the from clause @@ -2879,12 +2879,12 @@ SELECT extract(day from id) FROM project( TABLE( SELECT * FROM history ), 1); ERROR: function pg_catalog.date_part(unknown, integer) does not exist LINE 1: SELECT extract(day from id) FROM project( TABLE( SELECT * FR... ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT "time"+1 FROM project( TABLE( SELECT * FROM history ), 2); ERROR: operator does not exist: timestamp without time zone + integer LINE 1: SELECT "time"+1 FROM project( TABLE( SELECT * FROM history )... ^ -HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. +HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. -- ERROR: select columns projected out by the function SELECT id FROM project( TABLE( SELECT * FROM history ), 2); ERROR: column "id" does not exist @@ -3075,7 +3075,7 @@ PREPARE p2 AS SELECT * FROM multiset_2( $1 ) order by a, b; ERROR: function multiset_2(unknown) does not exist LINE 1: PREPARE p2 AS SELECT * FROM multiset_2( $1 ) order by a, b; ^ -HINT: No function matches the given name and argument types. You may need to add explicit type casts. +HINT: No function matches the given name and argument types. You might need to add explicit type casts. PREPARE p3(anytable) AS SELECT * FROM multiset_5( $1 ) order by a, b; ERROR: type "anytable" is not a valid parameter for PREPARE -- FAIL: $1 is not a constant