Hello,

I just wanted to create an example for a blog post and noticed that there
is (probably?) no way to aggregate data into an array, the way PostgreSQL
allows it through ARRAY_AGG():
http://www.postgresql.org/docs/9.3/interactive/functions-aggregate.html

An example in PostgreSQL:

select

  t.table_schema,

  t.table_name,
  array_agg(c.column_name::varchar order by c.ordinal_position)
from information_schema.tables t
join information_schema.columns c
on (t.table_schema, t.table_name)
 = (c.table_schema, c.table_name)
group by t.table_schema, t.table_name

Sample output:

"information_schema";"enabled_roles";"{role_name}"
"information_schema";"foreign_data_wrapper_options";"{foreign_data_wrapper_catalog,foreign_data_wrapper_name,option_name,option_value}"
"information_schema";"foreign_data_wrappers";"{foreign_data_wrapper_catalog,foreign_data_wrapper_name,authorization_identifier,library_name,foreign_data_wrapper_language}"
"information_schema";"foreign_server_options";"{foreign_server_catalog,foreign_server_name,option_name,option_value}"


Do you think this would be a useful addition to the roadmap?

Cheers
Lukas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to