Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 4C2112E2DB2 for ; Thu, 15 Nov 2007 11:38:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 92201-01-4 for ; Thu, 15 Nov 2007 11:38:35 -0400 (AST) Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 710422E2DA5 for ; Thu, 15 Nov 2007 11:38:35 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=crankycanuck.ca) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1Isgna-0006PC-7g for pgsql-admin@postgresql.org; Thu, 15 Nov 2007 10:38:34 -0500 Received: by crankycanuck.ca (Postfix, from userid 1000) id 03F72504FC; Thu, 15 Nov 2007 10:38:29 -0500 (EST) Date: Thu, 15 Nov 2007 10:38:28 -0500 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: trigger ddl actions in a table Message-ID: <20071115153828.GF20228@crankycanuck.ca> Mail-Followup-To: Andrew Sullivan , pgsql-admin@postgresql.org References: <1C2329C9430609409808ECF10237287612EA4CC7@mydomain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1C2329C9430609409808ECF10237287612EA4CC7@mydomain.com> User-Agent: Mutt/1.5.13 (2006-08-11) Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/144 X-Sequence-Number: 27387 On Thu, Nov 15, 2007 at 04:29:51PM +0100, "K=F6nig, Monika" wrote: > I can see all ddl in my log files, but=20 > - there are even the errors in and=20 > - i can't use it for a select There are logging options that should allow you to collect the DDL and th= en parse it. You could then load it into a table. But to answer your question, > Is there an possibility for having such an system-action table?? you cannot today have triggers on system tables, and AFAIK nobody has contributed a DDL-audit capability yet. IMO the safest (i.e. least subje= ct to attack) way to do this would be to pull it out of the WAL on another machine. Given that we already have PITR, the data must be in there (may= be not with a wallclock time, but with relative time). It seems this is something that could be added, if someone were to do the work. I am not aware that anyone is doing it at the moment, but I bet there are develope= rs who will work for sponsorship :) A --=20 Andrew Sullivan Old sigs will return after re-constitution of blue smoke