(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)));
}
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
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?
----------
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;
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
--
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
*/
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.
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
--