Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 227 Bytes

postgres.md

File metadata and controls

13 lines (9 loc) · 227 Bytes

Postgres

Backup database

 pg_dump -Ft -U cmdi -h 192.168.1.1 -p 5432 -f file.tar database

Concat rows to column

select column1, array_to_string(array_agg(distinct column2),',') from table group by 1