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@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)