aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/parser/parse_oper.c5
-rw-r--r--src/test/regress/expected/alter_table.out2
-rw-r--r--src/test/regress/expected/create_view.out2
-rw-r--r--src/test/regress/expected/geometry.out2
-rw-r--r--src/test/regress/expected/horology.out2
-rw-r--r--src/test/regress/expected/text.out2
-rw-r--r--src/test/regress/expected/timetz.out2
-rw-r--r--src/test/regress/expected/with.out2
8 files changed, 11 insertions, 8 deletions
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index e9bf50243f4..d7971cc3d9f 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -723,7 +723,10 @@ op_error(ParseState *pstate, List *op, char oprkind,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
errmsg("operator does not exist: %s",
op_signature_string(op, oprkind, arg1, arg2)),
- errhint("No operator matches the given name and argument type(s). "
+ (!arg1 || !arg2) ?
+ errhint("No operator matches the given name and argument type. "
+ "You might need to add an explicit type cast.") :
+ errhint("No operator matches the given name and argument types. "
"You might need to add explicit type casts."),
parser_errposition(pstate, location)));
}
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 58192d2c6af..ed03cb9c630 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -1895,7 +1895,7 @@ alter table anothertab alter column atcol1 drop default;
alter table anothertab alter column atcol1 type boolean
using case when atcol1 % 2 = 0 then true else false end; -- fails
ERROR: operator does not exist: boolean <= integer
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
alter table anothertab drop constraint anothertab_chk;
alter table anothertab drop constraint anothertab_chk; -- fails
ERROR: constraint "anothertab_chk" of relation "anothertab" does not exist
diff --git a/src/test/regress/expected/create_view.out b/src/test/regress/expected/create_view.out
index f909a3cefeb..4468c85d778 100644
--- a/src/test/regress/expected/create_view.out
+++ b/src/test/regress/expected/create_view.out
@@ -1605,7 +1605,7 @@ select 'foo'::text = any((select array['abc','def','foo']::text[])); -- fail
ERROR: operator does not exist: text = text[]
LINE 1: select 'foo'::text = any((select array['abc','def','foo']::t...
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
select 'foo'::text = any((select array['abc','def','foo']::text[])::text[]);
?column?
----------
diff --git a/src/test/regress/expected/geometry.out b/src/test/regress/expected/geometry.out
index 1271395d4ea..e4c00390400 100644
--- a/src/test/regress/expected/geometry.out
+++ b/src/test/regress/expected/geometry.out
@@ -107,7 +107,7 @@ SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection
ERROR: operator does not exist: lseg # point
LINE 1: SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
-- closest point
SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest
FROM LSEG_TBL l, POINT_TBL p;
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index f9d12e0f8a3..7b3d058425d 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -321,7 +321,7 @@ SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time
ERROR: operator does not exist: date - time with time zone
LINE 1: SELECT date '1991-02-03' - time with time zone '04:05:06 UTC...
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
--
-- timestamp, interval arithmetic
--
diff --git a/src/test/regress/expected/text.out b/src/test/regress/expected/text.out
index 829f2c224ca..d28961cf880 100644
--- a/src/test/regress/expected/text.out
+++ b/src/test/regress/expected/text.out
@@ -50,7 +50,7 @@ select 3 || 4.0;
ERROR: operator does not exist: integer || numeric
LINE 1: select 3 || 4.0;
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
/*
* various string functions
*/
diff --git a/src/test/regress/expected/timetz.out b/src/test/regress/expected/timetz.out
index 43911312f9d..33ff8e18c9d 100644
--- a/src/test/regress/expected/timetz.out
+++ b/src/test/regress/expected/timetz.out
@@ -92,4 +92,4 @@ SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TIMETZ_TBL;
ERROR: operator does not exist: time with time zone + time with time zone
LINE 1: SELECT f1 + time with time zone '00:01' AS "Illegal" FROM TI...
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
diff --git a/src/test/regress/expected/with.out b/src/test/regress/expected/with.out
index fdcc4970a13..c32a4905806 100644
--- a/src/test/regress/expected/with.out
+++ b/src/test/regress/expected/with.out
@@ -166,7 +166,7 @@ SELECT n, n IS OF (int) AS is_int FROM t;
ERROR: operator does not exist: text + integer
LINE 4: SELECT n+1 FROM t WHERE n < 10
^
-HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
+HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
--
-- Some examples with a tree
--