mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Convert hstore_in to report errors softly.
The error reporting here was not only old and crufty, but untested. I took the opportunity to bring the messages into some sort of compliance with our message style guidelines. Discussion: https://postgr.es/m/6B6A5C77-60AD-4A71-9F3A-B2C026A281A6@dunslane.net
This commit is contained in:
@ -53,6 +53,17 @@ select e'\\"a=>q"w'::hstore;
|
||||
select ''::hstore;
|
||||
select ' '::hstore;
|
||||
|
||||
-- invalid input
|
||||
select ' =>null'::hstore;
|
||||
select 'aa=>"'::hstore;
|
||||
|
||||
-- also try it with non-error-throwing API
|
||||
select pg_input_is_valid('a=>b', 'hstore');
|
||||
select pg_input_is_valid('a=b', 'hstore');
|
||||
select pg_input_error_message('a=b', 'hstore');
|
||||
select pg_input_error_message(' =>b', 'hstore');
|
||||
|
||||
|
||||
-- -> operator
|
||||
|
||||
select 'aa=>b, c=>d , b=>16'::hstore->'c';
|
||||
|
Reference in New Issue
Block a user