Convert a few more datatype input functions to report errors softly.

Convert the remaining string-category input functions
(bpcharin, varcharin, byteain) to the new style.

Discussion: https://postgr.es/m/3038346.1671060258@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2022-12-14 19:42:05 -05:00
parent 90161dad4d
commit 3b9d2deb67
14 changed files with 203 additions and 30 deletions

View File

@ -72,6 +72,11 @@ INSERT INTO CHAR_TBL (f1) VALUES ('abcde');
SELECT * FROM CHAR_TBL;
-- Also try it with non-error-throwing API
SELECT pg_input_is_valid('abcd ', 'char(4)');
SELECT pg_input_is_valid('abcde', 'char(4)');
SELECT pg_input_error_message('abcde', 'char(4)');
--
-- Also test "char", which is an ad-hoc one-byte type. It can only
-- really store ASCII characters, but we allow high-bit-set characters