fix: allow cast on types with underscores/numbers

e.g. select=oid_array::_int4
This commit is contained in:
steve-chavez
2022-05-09 13:02:33 -05:00
committed by Steve Chavez
parent 867f2569a0
commit d88b16e5ab
6 changed files with 23 additions and 5 deletions
+9
View File
@@ -762,3 +762,12 @@ INSERT INTO test.limited_delete_items_cpk VALUES (1, 'item-1'), (2, 'item-2'), (
TRUNCATE TABLE test.limited_delete_items_no_pk CASCADE;
INSERT INTO test.limited_delete_items_no_pk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
TRUNCATE TABLE test.xmltest CASCADE;
INSERT INTO test.xmltest VALUES
(1, '<myxml>foo</myxml>'),
(2, 'bar'),
(3, '<foobar><baz/></foobar>');
TRUNCATE TABLE test.oid_test CASCADE;
INSERT INTO oid_test(id, oid_col, oid_array_col) VALUES (1, '12345', '{1,2,3,4,5}'::oid[]);
+1
View File
@@ -179,6 +179,7 @@ GRANT ALL ON TABLE
, limited_delete_items_cpk_view
, limited_update_items_cpk_view
, xmltest
, oid_test
TO postgrest_test_anonymous;
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
+4 -4
View File
@@ -2589,7 +2589,7 @@ CREATE TABLE test.xmltest (
xml pg_catalog.xml NOT NULL
);
INSERT INTO test.xmltest VALUES
(1, '<myxml>foo</myxml>'),
(2, 'bar'),
(3, '<foobar><baz/></foobar>');
CREATE TABLE oid_test(
id int,
oid_col oid,
oid_array_col oid[]);