Re: Docs - Plpgsql trigger example auditing changes into

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: Docs - Plpgsql trigger example auditing changes into
Дата
Msg-id 41B2C066.20807@coretech.co.nz
обсуждение исходный текст
Ответ на Re: Docs - Plpgsql trigger example auditing changes into  (David Fetter <david@fetter.org>)
Список pgsql-patches
David Fetter wrote:

>It occurs to me that this might be a place to demo table inheritance
>too, to ease automating the creation, etc. of the auditing
>infrastructure :)
>
>
>
It certainly makes the creation of the audit table painless :

CREATE TABLE emp_audit(
    operation         char(1)   NOT NULL,
    stamp             timestamp NOT NULL,
    userid            text      NOT NULL
) INHERITS (emp);

However SELECT FROM emp will return rows from emp_audit as well! (unless
we always use FROM ONLY or set SQL_INHERITANCE=false). This seem likely
to confuse things!

regards

Mark


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Charset WIN1252
Следующее
От: "Korea PostgreSQL Users' Group"
Дата:
Сообщение: patch contrib/pgcrypto for win32