Re: How to generate file from postgres data

2021-06-12 Thread Vijaykumar Jain
correction, i kind of recollected this as my own problem of a client wanting 100k rows worth data downloadable. we finally decided with csv dump and upload to object store, from where the client would download the file. all other options like web ui with pagination etc were resulting in memory iss

Re: How to generate file from postgres data

2021-06-12 Thread Vijaykumar Jain
test=# create table t(id int, value text); CREATE TABLE test=# insert into t select x, x::text from generate_series(1, 1000) x; INSERT 0 1000 test=# COPY (select * from t where id < 50 order by id desc) TO '/tmp/report.csv' DELIMITER ',' CSV HEADER; copy out the results via a view or sql d