Interaction Record (Journal Table?)

Поиск
Список
Период
Сортировка
От Clark C . Evans
Тема Interaction Record (Journal Table?)
Дата
Msg-id 20010826135759.A16703@doublegemini.com
обсуждение исходный текст
Список pgsql-general
I was thinking that for the application I'm
working on, it'd be nice to have a journal
(as an XML fragment) which describes  the
interactions within the database...

    <insert table="person">
        <id>3493</id>
        <given>Clark</given>
        <family>Evans</family>
    </insert>
    <update table="person" id="3493">
       <middle>Cameron</middle>
    </update>
    <delete table="person" id=3493" />

I was wondering if anyone has done
something similar?  If so, what
approach did you use and is it
published as a reuseable module?

If not... how would you go about
approaching this?  I suppose it could
all fit in a "journal" table using
arrays?

JOURNAL has 6 columns:
    action, target_table, where_columns, where_values, columns, values

INSERT INTO JOURNAL VALUES ('insert','person'
    ,NULL,NULL,
    ['id','given','family'],[3493,'Clark','Evans']);
INSERT INTO JOURNAL VALUES ('update','person',
    ['id'], [3439],
    ['middle'],['Cameron']);
INSERT INTO JOURNAL VALUES ('delete','person',
    ['id'],[3439],
    NULL,NULL);

I guess this would be better in the spirit of
PostgreSQL... in this way one can easily make
the dump of the SQL above...

Thoughts?

Clark







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

Предыдущее
От: "Denis A. Doroshenko"
Дата:
Сообщение: Re: MySQL's (false?) claims... (was: Re: PL/java?)
Следующее
От: "Alex Knight"
Дата:
Сообщение: Re: PL/java?