diff options
author | Michael Paquier <michael@paquier.xyz> | 2023-02-28 08:04:13 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2023-02-28 08:04:13 +0900 |
commit | b8da37b3ada2e547983538b3e49f8079f85ce120 (patch) | |
tree | d3ecf7af84a5b492e7a2b62b79df0398f3c8bccd /src/include/catalog/pg_proc.dat | |
parent | 728560db7d868b3ded9a8675742083ab89bcff7c (diff) | |
download | postgresql-b8da37b3ada2e547983538b3e49f8079f85ce120.tar.gz |
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
Diffstat (limited to 'src/include/catalog/pg_proc.dat')
-rw-r--r-- | src/include/catalog/pg_proc.dat | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index e2a7642a2b..505595620e 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -7118,9 +7118,13 @@ proname => 'pg_input_is_valid', provolatile => 's', prorettype => 'bool', proargtypes => 'text text', prosrc => 'pg_input_is_valid' }, { oid => '8051', - descr => 'get error message if string is not valid input for data type', - proname => 'pg_input_error_message', provolatile => 's', prorettype => 'text', - proargtypes => 'text text', prosrc => 'pg_input_error_message' }, + descr => 'get error details if string is not valid input for data type', + proname => 'pg_input_error_info', provolatile => 's', prorettype => 'record', + proargtypes => 'text text', + proallargtypes => '{text,text,text,text,text,text}', + proargmodes => '{i,i,o,o,o,o}', + proargnames => '{value,type_name,message,detail,hint,sql_error_code}', + prosrc => 'pg_input_error_info' }, { oid => '1268', descr => 'parse qualified identifier to array of identifiers', |