Received: from miranda.emc.com.ph ([210.23.230.194]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2N7FAw88083 for ; Fri, 23 Mar 2001 02:15:10 -0500 (EST) (envelope-from pgsql-sql@fc.emc.com.ph) Received: from fc.emc.com.ph (mnl.emc.com.ph [203.167.64.16]) by miranda.emc.com.ph (Postfix) with ESMTP id 834956B0B6 for ; Fri, 23 Mar 2001 15:15:03 +0800 (PHT) Message-id: Date: Fri, 23 Mar 2001 15:15:02 +0800 Subject: trigger output to a file To: pgsql-sql@postgresql.org From: "pgsql-sql" MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200103/456 X-Sequence-Number: 2124 Hello Everyone, Here's my simple question. I just want to know/get the recent changes made to a table. Deeper? I wanted the Postgresql server to *publish* every changes made to a table (similar to replication, incremental transfer, etc.). What is the best way to go about it? My idea is to create a trigger for every insert/update that will select the new/updated record and output it to a file. Or better yet, I would like to output the actual sql query to file. Is it possible to output the result of an sql query from a trigger to a file? How? I would appreciate any answer. Thank you very much. Sherwin