adrian.klaver@aklaver.com wrote:
bryn@yugabyte.com wrote:
I noticed that "array()" is used in the query that implements the "\du" psql meta-command. It has some similarity with "array_agg()" thus:
create temporary view x(v) as (values (17), (42));
select array_agg(v) from x;
select array(select v from x);
Anyway, I can't find where "array()" is documented. Google does find me a hit on stackexchange-dot-com. But it doesn't x-ref to the PG doc.
Thanks. I can't, even now, formulate a search that finds this—unless I know that it's a kind of array constructor. (I'll concede, with the benefit of hindsight, that I should have thought of that.) I hope that I'll be able to learn to navigate the PG docs better over time.
Why is the "array()" constructor not found in "pg_proc"? After all, section 4.2.12 refers to "array_agg()" as a constructor. And that *is* found in "pg_proc".