mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Rework pg_input_error_message(), now renamed pg_input_error_info()
pg_input_error_info() is now a SQL function able to return a row with more than just the error message generated for incorrect data type inputs when these are able to handle soft failures, returning more contents of ErrorData, as of: - The error message (same as before). - The error detail, if set. - The error hint, if set. - SQL error code. All the regression tests that relied on pg_input_error_message() are updated to reflect the effects of the rename. Per discussion with Tom Lane and Andrew Dunstan. Author: Nathan Bossart Discussion: https://postgr.es/m/139a68e1-bd1f-a9a7-b5fe-0be9845c6311@dunslane.net
This commit is contained in:
@@ -12,9 +12,9 @@ SELECT * FROM xmltest;
|
||||
-- test non-throwing API, too
|
||||
SELECT pg_input_is_valid('<value>one</value>', 'xml');
|
||||
SELECT pg_input_is_valid('<value>one</', 'xml');
|
||||
SELECT pg_input_error_message('<value>one</', 'xml');
|
||||
SELECT message FROM pg_input_error_info('<value>one</', 'xml');
|
||||
SELECT pg_input_is_valid('<?xml version="1.0" standalone="y"?><foo/>', 'xml');
|
||||
SELECT pg_input_error_message('<?xml version="1.0" standalone="y"?><foo/>', 'xml');
|
||||
SELECT message FROM pg_input_error_info('<?xml version="1.0" standalone="y"?><foo/>', 'xml');
|
||||
|
||||
|
||||
SELECT xmlcomment('test');
|
||||
|
||||
Reference in New Issue
Block a user