Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YjMhQ-0001lF-QM for pgsql-general@arkaria.postgresql.org; Sat, 18 Apr 2015 06:57:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YjMhQ-0005RO-3R for pgsql-general@arkaria.postgresql.org; Sat, 18 Apr 2015 06:57:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YjMhP-0005RF-1P for pgsql-general@postgresql.org; Sat, 18 Apr 2015 06:57:55 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YjMhL-0007rO-B0 for pgsql-general@postgresql.org; Sat, 18 Apr 2015 06:57:52 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id t3I6vlH21000 for ; Fri, 17 Apr 2015 23:57:47 -0700 Message-ID: <55320066.6030005@hogranch.com> Date: Fri, 17 Apr 2015 23:57:42 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: function to send email with query results References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org 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