mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Convert contrib/intarray's bqarr_in() to report errors softly
Reviewed by Tom Lane and Amul Sul Discussion: https://postgr.es/m/49e598c2-cfe8-0928-b6fb-d0cc51aab626@dunslane.net
This commit is contained in:
@ -75,6 +75,17 @@ SELECT '1&2&4&5&6'::query_int;
|
||||
SELECT '1&(2&(4&(5|6)))'::query_int;
|
||||
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
|
||||
FROM (VALUES ('1&(2&(4&(5|6)))'),
|
||||
('1#(2&(4&(5&6)))'),
|
||||
('foo'))
|
||||
AS a(str);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE test__int( a int[] );
|
||||
\copy test__int from 'data/test__int.data'
|
||||
|
Reference in New Issue
Block a user