Re: Export Query Output to incremental csv file - Mailing list pgsql-admin

From Ron Johnson
Subject Re: Export Query Output to incremental csv file
Date
Msg-id CANzqJaCYnDHexB-QucpAtK8AZ6Aj8eyHKhDjwHjy+eENFuxZ7g@mail.gmail.com
Whole thread Raw
In response to Export Query Output to incremental csv file  (Erik Serrano <eserranos@gmail.com>)
Responses Re: Export Query Output to incremental csv file
List pgsql-admin
On Thu, Aug 8, 2024 at 10:26 AM Erik Serrano <eserranos@gmail.com> wrote:
Hi guys,
I would like to ask a question about exporting a query output to a csv file but with the particularity that it is incremental (that is, the same file grows in size) since I need to do the query multiple times and I don't want to fill up with csv files... but rather just one that always grows, as if it were a log.

I will add the query to a shell and schedule it using a crontab in Linux Centos.

COPY ... TO STDOUT, and then append that to the CSV file using ">>".

(Unless I misinterpret what you mean.)

--
Death to America, and butter sauce.
Iraq lobster!

pgsql-admin by date:

Previous
From: Erik Serrano
Date:
Subject: Export Query Output to incremental csv file
Next
From: Erik Serrano
Date:
Subject: Re: Export Query Output to incremental csv file