Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB6NaQm08000 for ; Thu, 6 Dec 2001 18:36:26 -0500 (EST) (envelope-from ler@lerctr.org) Received: from lerami.lerctr.org (localhost [127.0.0.1]) by lerami.lerctr.org (8.12.1/8.12.1/20010730/$Revision: 1.25 $) with ESMTP id fB6NaSqw012884 for ; Thu, 6 Dec 2001 17:36:28 -0600 (CST) Received: (from ler@localhost) by lerami.lerctr.org (8.12.1/8.12.1/Submit) id fB6NaSPo012883 for pgsql-sql@postgresql.org; Thu, 6 Dec 2001 23:36:28 GMT Date: Thu, 6 Dec 2001 17:36:28 -0600 From: Larry Rosenman To: PostgreSQL SQL List Subject: Trigger for logging stuff... Message-ID: <20011206173628.A12797@lerami.lerctr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Archive-Number: 200112/86 X-Sequence-Number: 5909 This may be a dup... I know I've seen an example somewhere, but can't find it right now of a PL/pgSQL function that audit's insert/update/delete of rows in a audit type table. How does the PL/pgSQL function know what fields are in the row? How can I add a by and timestamp field to the row? Thanks! LER -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749