diff options
Diffstat (limited to 'contrib/intarray')
| -rw-r--r-- | contrib/intarray/expected/_int.out | 18 | ||||
| -rw-r--r-- | contrib/intarray/sql/_int.sql | 8 |
2 files changed, 17 insertions, 9 deletions
diff --git a/contrib/intarray/expected/_int.out b/contrib/intarray/expected/_int.out index c953065a5c..6abb17e2e5 100644 --- a/contrib/intarray/expected/_int.out +++ b/contrib/intarray/expected/_int.out @@ -401,16 +401,20 @@ SELECT '1&(2&(4&(5|!6)))'::query_int; -- test non-error-throwing input SELECT str as "query_int", pg_input_is_valid(str,'query_int') as ok, - pg_input_error_message(str,'query_int') as errmsg + errinfo.sql_error_code, + errinfo.message, + errinfo.detail, + errinfo.hint FROM (VALUES ('1&(2&(4&(5|6)))'), ('1#(2&(4&(5&6)))'), ('foo')) - AS a(str); - query_int | ok | errmsg ------------------+----+-------------- - 1&(2&(4&(5|6))) | t | - 1#(2&(4&(5&6))) | f | syntax error - foo | f | syntax error + AS a(str), + LATERAL pg_input_error_info(a.str, 'query_int') as errinfo; + query_int | ok | sql_error_code | message | detail | hint +-----------------+----+----------------+--------------+--------+------ + 1&(2&(4&(5|6))) | t | | | | + 1#(2&(4&(5&6))) | f | 42601 | syntax error | | + foo | f | 42601 | syntax error | | (3 rows) CREATE TABLE test__int( a int[] ); diff --git a/contrib/intarray/sql/_int.sql b/contrib/intarray/sql/_int.sql index 4c9ba4c1fb..d9d987bdb1 100644 --- a/contrib/intarray/sql/_int.sql +++ b/contrib/intarray/sql/_int.sql @@ -79,11 +79,15 @@ SELECT '1&(2&(4&(5|!6)))'::query_int; SELECT str as "query_int", pg_input_is_valid(str,'query_int') as ok, - pg_input_error_message(str,'query_int') as errmsg + errinfo.sql_error_code, + errinfo.message, + errinfo.detail, + errinfo.hint FROM (VALUES ('1&(2&(4&(5|6)))'), ('1#(2&(4&(5&6)))'), ('foo')) - AS a(str); + AS a(str), + LATERAL pg_input_error_info(a.str, 'query_int') as errinfo; |
