Skip to content

Commit c534dbd

Browse files
author
liushengsong
committed
fix test until geometry
1 parent a665304 commit c534dbd

File tree

6 files changed

+930
-13
lines changed

6 files changed

+930
-13
lines changed

src/test/regress/expected/box_optimizer.out

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,3 +675,28 @@ WHERE seq.id IS NULL OR idx.id IS NULL;
675675
RESET enable_seqscan;
676676
RESET enable_indexscan;
677677
RESET enable_bitmapscan;
678+
-- test non-error-throwing API for some core types
679+
SELECT pg_input_is_valid('200', 'box');
680+
pg_input_is_valid
681+
-------------------
682+
f
683+
(1 row)
684+
685+
SELECT * FROM pg_input_error_info('200', 'box');
686+
message | detail | hint | sql_error_code
687+
------------------------------------------+--------+------+----------------
688+
invalid input syntax for type box: "200" | | | 22P02
689+
(1 row)
690+
691+
SELECT pg_input_is_valid('((200,300),(500, xyz))', 'box');
692+
pg_input_is_valid
693+
-------------------
694+
f
695+
(1 row)
696+
697+
SELECT * FROM pg_input_error_info('((200,300),(500, xyz))', 'box');
698+
message | detail | hint | sql_error_code
699+
-------------------------------------------------------------+--------+------+----------------
700+
invalid input syntax for type box: "((200,300),(500, xyz))" | | | 22P02
701+
(1 row)
702+

src/test/regress/expected/inet_optimizer.out

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,3 +1068,40 @@ SELECT a FROM (VALUES
10681068
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
10691069
(91 rows)
10701070

1071+
-- test non-error-throwing API for some core types
1072+
SELECT pg_input_is_valid('1234', 'cidr');
1073+
pg_input_is_valid
1074+
-------------------
1075+
f
1076+
(1 row)
1077+
1078+
SELECT * FROM pg_input_error_info('1234', 'cidr');
1079+
message | detail | hint | sql_error_code
1080+
--------------------------------------------+--------+------+----------------
1081+
invalid input syntax for type cidr: "1234" | | | 22P02
1082+
(1 row)
1083+
1084+
SELECT pg_input_is_valid('192.168.198.200/24', 'cidr');
1085+
pg_input_is_valid
1086+
-------------------
1087+
f
1088+
(1 row)
1089+
1090+
SELECT * FROM pg_input_error_info('192.168.198.200/24', 'cidr');
1091+
message | detail | hint | sql_error_code
1092+
------------------------------------------+--------------------------------------+------+----------------
1093+
invalid cidr value: "192.168.198.200/24" | Value has bits set to right of mask. | | 22P02
1094+
(1 row)
1095+
1096+
SELECT pg_input_is_valid('1234', 'inet');
1097+
pg_input_is_valid
1098+
-------------------
1099+
f
1100+
(1 row)
1101+
1102+
SELECT * FROM pg_input_error_info('1234', 'inet');
1103+
message | detail | hint | sql_error_code
1104+
--------------------------------------------+--------+------+----------------
1105+
invalid input syntax for type inet: "1234" | | | 22P02
1106+
(1 row)
1107+

0 commit comments

Comments
 (0)