From: | Tim Clarke <tim(dot)clarke(at)minerva(dot)info> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Best way to use trigger to email a report ? |
Date: | 2020-05-08 16:52:07 |
Message-ID: | 484e9d6c-1331-357c-f889-017c5ff81b59@minerva.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Personally I'd have your trigger put the necessary data into a queue to run the report then have some other process take that data off asynchronously. Either pop it in a table and do it yourself or use a robust distributed broker protocol platform like RabbitMQ or Apache ActiveMQ or Kafka.
Tim Clarke MBCS
IT Director
Direct: +44 (0)1376 504510 | Mobile: +44 (0)7887 563420
On 08/05/2020 17:26, David Gauthier wrote:
psql (9.6.0, server 11.3) on linux
Looking for ideas. I want a trigger to...
1) compose an html report based on DB content
2) email the report to a dist list (dl = value of a table column)
If this will involve hybrid coding, I prefer PL/perl. The linux env has both "mail" and "mutt" (if this is of any help).
The idea is to send a report to the list when all the data has been collected for a particular job and the final status of the job is updated as a col of a rec of a certain table. Probably a post update trigger.
Thanks for any ideas :-)
Telephone: Witham: +44(0)1376 503500 | London: +44 (0)20 3009 0853 | Frankfurt: +49 (0)69 7191 6000 | Hong Kong: +852 5803 1687 | Toronto: +1 647 503 2848
Web: https://www.manifest.co.uk/
Minerva Analytics Ltd - A Solactive Company
9 Freebournes Court | Newland Street | Witham | Essex | CM8 2BL | United Kingdom
________________________________
Copyright: This e-mail may contain confidential or legally privileged information. If you are not the named addressee you must not use or disclose such information, instead please report it to admin(at)minerva(dot)info<mailto:admin(at)minerva(dot)info>
Legal: Minerva Analytics is the trading name of: Minerva Analytics Ltd: Registered in England Number 11260966 & The Manifest Voting Agency Ltd: Registered in England Number 2920820 Registered Office at above address. Please Click Here https://www.manifest.co.uk/legal/ for further information.
From | Date | Subject | |
---|---|---|---|
Next Message | Fehrle, Brian | 2020-05-08 16:57:49 | Re: Thoughts on how to avoid a massive integer update. |
Previous Message | David Gauthier | 2020-05-08 16:26:09 | Best way to use trigger to email a report ? |