Export data from a query ran by pgagent

From: Gonzalo Rubio Casas <gonzalo(dot)rubio(dot)casas(at)gmail(dot)com>
To: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Export data from a query ran by pgagent
Date: 2020-11-26 13:55:02
Message-ID: CAL9Ra8B=qnx22XusbA+T3KZkv-GUp7Xi40xWj8WWZfB2aG1KaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi everyone,

I hope someone has an idea because I have been stuck with this for a couple
of days. I'm using pgagent to allow some users of my database to schedule
period *remote* queries that create some reports.

However, I do not find anywhere on the manual or the mailing list how to
retrieve the result of the ran queries. Alternatively, I have used COPY
statement although that requires the SQL query being run by a superuser
which is not an option anymore as this compromises the general security of
the system.

Does anyone know or has come with a hack for exporting the information
retrieved by a query run by pgagent? It is important to note that pgagent
jobs are connected to a remote database so the possibility of a shell
script is not possible I'm afraid.

Kind regards,

Gonzalo

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2020-11-26 14:55:23 Re: Export data from a query ran by pgagent
Previous Message Dave Page 2020-11-26 11:38:35 Re: pgadmin--pgagent---the process hang by unknow reasons