From: | Jim Nasby <decibel(at)decibel(dot)org> |
---|---|
To: | Noah Heusser <noah(at)heussers(dot)ch> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Dynamic Log tigger (plpgsql) |
Date: | 2007-06-22 21:29:28 |
Message-ID: | 09B1FAEB-3361-4601-B3B7-A8B985EA7246@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jun 16, 2007, at 6:26 AM, Noah Heusser wrote:
> I want to implement a trigger-function witch can fill the following
> table.
> Each data manipulation (INSERT, UPDATE or DELETE) gets logged.
> The function should work as trigger on diffrent tables.
>
> CREATE TABLE logtable (
> operation CHAR(6) CHECK (change_type IN ('DELETE',
> 'INSERT', 'UPDATE')),
Note that that field will take 12 bytes in 8.2, and assuming that
varvarlena is in 8.3, 8 bytes there (or is varvarlena byte-aligned?)
You might be better going with "char" (with the double-quotes) and
'D', 'I', and 'U'.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2007-06-22 21:33:23 | Re: [JDBC] creating temporary table PostgreSql 8.1 and iBatis 2.3 |
Previous Message | tomasz brymora | 2007-06-22 21:29:24 | creating temporary table PostgreSql 8.1 and iBatis 2.3 |