I would like to send out a weekly email to two or three users containing the output of a select statement, run against Postgres. Very simple select all statement to show the number of users in the system.
I am able to query the database via command line and see the result, but not email those results to someone. Is there a script that can be used for this task or a better approach? This is the code I ran to test connection to the database and see if I could pull data from it. Using PostgreSQL 9.1
This solution is for Windows Server 2008.