agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: function to send email with query results
Date: Fri, 17 Apr 2015 23:57:42 -0700
Message-ID: <55320066.6030005@hogranch.com> (raw)
In-Reply-To: <CAJP7dtCrT1C9S0g9haYVy=q01-bADZ2apJqS7avjT_-kScbO6w@mail.gmail.com>
References: <CAJP7dtCrT1C9S0g9haYVy=q01-bADZ2apJqS7avjT_-kScbO6w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 4/17/2015 10:30 PM, Suresh Raja wrote:
>
> I'm looking to write a function to send email with result of a query. 
>    Is it possible to send email with in a function. Any help is 
> appreciated.

I would do that in an application, not a plXXXX sql function.   make a 
query, fetch the results, format them as you see fit for the email and 
toss it at your language-of-choice's email facility.



-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (6+ messages)  latest in thread

Message-ID: <55320066.6030005@hogranch.com>
Permalink:  ../55320066.6030005@hogranch.com/
Also on:    postgresql.org/message-id/55320066.6030005@hogranch.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pierce@hogranch.com, pgsql-general@postgresql.org
  Subject: Re: function to send email with query results
  In-Reply-To: <55320066.6030005@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox