1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Don't emit non-canonical empty arrays in array_remove().

Dean Rasheed
This commit is contained in:
Noah Misch
2013-05-31 21:50:59 -04:00
parent 01497e738e
commit 97c4d9b7c7
3 changed files with 15 additions and 0 deletions

View File

@ -438,6 +438,7 @@ select array_remove(array[1,2,2,3], 5);
select array_remove(array[1,NULL,NULL,3], NULL);
select array_remove(array['A','CC','D','C','RR'], 'RR');
select array_remove('{{1,2,2},{1,4,3}}', 2); -- not allowed
select array_remove(array['X','X','X'], 'X') = '{}';
select array_replace(array[1,2,5,4],5,3);
select array_replace(array[1,2,5,4],5,NULL);
select array_replace(array[1,2,NULL,4,NULL],NULL,5);