Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B360E9F99B7 for ; Tue, 21 Aug 2007 11:55:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 30409-03 for ; Tue, 21 Aug 2007 11:54:39 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id BEE549F9976 for ; Tue, 21 Aug 2007 11:54:56 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id f5so1065870nfh for ; Tue, 21 Aug 2007 07:54:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=W19puDesyvN2lz51kq5uwBBd5ZBf1495ey6wIVFelDmZUYSbu/6NpD5R3KIgeazGwor8OGqEHeP61xUBqUyEFy4DIjbxalYfPrIhj9TKbvnAVTwcqmgNsONQQqF7Blg3BymMETKsTjHqew7u7/nLGnYudl4bU4axqzSTycfrEHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=lMWyESTaCSeQK9ja5v+V+NxkYZU9lKQHuXJj+qvXHlPrSuGH+02qAXh50Ne+XOTKUXzgUSt8YvDh6Em3tg121gaWRfYRLj/oZd1dJUYf3541GI5/HxrDV0Ildmm4LEJiYgu08vn7SUrwm/VX0Ya5DFozqBHzrepg2y1AXzYcLM4= Received: by 10.78.204.20 with SMTP id b20mr2843635hug.1187708090049; Tue, 21 Aug 2007 07:54:50 -0700 (PDT) Received: by 10.78.201.16 with HTTP; Tue, 21 Aug 2007 07:54:49 -0700 (PDT) Message-ID: <1d219a6f0708210754v456fecaer68d0420cf2526c12@mail.gmail.com> Date: Tue, 21 Aug 2007 10:54:50 -0400 From: "Chris Hoover" To: "pgsql-admin@postgresql.org Admin" Subject: How to export query results MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11074_2284439.1187708090014" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/250 X-Sequence-Number: 26581 ------=_Part_11074_2284439.1187708090014 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I need some guidance. I need to have an after insert trigger execute on a specific table and export the results of query to a file on the database file system. Is this possible to do from a trigger? If so, how can I accomplish this? I am drawing a blank on how to export the results of the query. Thanks, Chris ------=_Part_11074_2284439.1187708090014 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I need some guidance. 

I need to have an after insert trigger execute on a specific table and export the results of query to a file on the database file system.  Is this possible to do from a trigger?  If so, how can I accomplish this?  I am drawing a blank on how to export the results of the query.

Thanks,


Chris
------=_Part_11074_2284439.1187708090014--