mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Arrange for an explicit cast applied to an ARRAY[] constructor to be applied
directly to all the member expressions, instead of the previous implementation where the ARRAY[] constructor would infer a common element type and then we'd coerce the finished array after the fact. This has a number of benefits, one being that we can allow an empty ARRAY[] construct so long as its element type is specified by such a cast. Brendan Jurd, minor fixes by me.
This commit is contained in:
@ -280,6 +280,7 @@ select E'{{1,2},\\{2,3}}'::text[];
|
||||
select '{{"1 2" x},{3}}'::text[];
|
||||
select '{}}'::text[];
|
||||
select '{ }}'::text[];
|
||||
select array[];
|
||||
-- none of the above should be accepted
|
||||
|
||||
-- all of the following should be accepted
|
||||
@ -292,6 +293,7 @@ select '{
|
||||
0 second,
|
||||
@ 1 hour @ 42 minutes @ 20 seconds
|
||||
}'::interval[];
|
||||
select array[]::text[];
|
||||
-- all of the above should be accepted
|
||||
|
||||
-- tests for array aggregates
|
||||
|
Reference in New Issue
Block a user