You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
Added with minor corrections. Feel free to do a PR when not exactly what you meant:)
-- using the ARRAY constructor
SELECT ARRAY(VALUES (1), (2), (3));
-- ARRAY constructor with a subselect
SELECT ARRAY(SELECT v FROM ( VALUES (1), (2), (3) ) vals (v));
SELECT ARRAY(SELECT col1 FROM ( VALUES (1), (2), (3) ) vals (v)); -- {1,2,3}
basically equivalent to SELECT (SELECT array_agg(col1) ...)
I'm not sure whether one performs better than the other but the ARRAY() form seems more natural when working in a scalar subquery context.
The text was updated successfully, but these errors were encountered: