Last edit
Changed:
< psql -t cas -c 'copy ( select id, ra,dec, pm_ra, pm_dec, bmag, vmag, rmag from nomad.main where vmag >= 5 and vmag <=17) to stdout with csv' > nomad-x-5-17.csv
to
> psql -t cas -c 'copy (
> select id, ra,dec, pm_ra, pm_dec, bmag, vmag, rmag from nomad.main
> where vmag >= 5 and vmag <=17
> )
> to stdout with csv' > nomad-x-5-17.csv
Надо было сделать подвыборку не всех полей из большой БД, оказалось очень просто можно сделать так:
psql -t cas -c 'copy ( select id, ra,dec, pm_ra, pm_dec, bmag, vmag, rmag from nomad.main where vmag >= 5 and vmag <=17 ) to stdout with csv' > nomad-x-5-17.csv