Re: Dynamic Log tigger (plpgsql)

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Dynamic Log tigger (plpgsql)
Дата
Msg-id 09B1FAEB-3361-4601-B3B7-A8B985EA7246@decibel.org
обсуждение исходный текст
Ответ на Dynamic Log tigger (plpgsql)  (Noah Heusser <noah@heussers.ch>)
Список 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@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



В списке pgsql-general по дате отправления:

Предыдущее
От: Tony Caduto
Дата:
Сообщение: Re: Proposed Feature
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: A problem in inheritance