Re: [Solved] Generic logging system for pre-hstore using plperl triggers - Mailing list pgsql-general

From Merlin Moncure
Subject Re: [Solved] Generic logging system for pre-hstore using plperl triggers
Date
Msg-id CAHyXU0z8r1W_fTv1uD5Axii7QQ++PXERMt3C+Sbp+skDSiKtPg@mail.gmail.com
Whole thread Raw
In response to Re: [Solved] Generic logging system for pre-hstore using plperl triggers  (Diego Augusto Molina <diegoaugustomolina@gmail.com>)
Responses Re: [Solved] Generic logging system for pre-hstore using plperl triggers
List pgsql-general
2011/9/27 Diego Augusto Molina <diegoaugustomolina@gmail.com>:
>                /* Created by Diego Augusto Molina in 2011 for Tucuman Government,
> Argentina. */



OK, few random comments:
*) when posting schema definitions, particularly in email format, try
not to use dumped definitions from pg_dump or pgadmin. This creates a
lot of noise in the script that detracts from what you are trying to
do.   Also an attached file would probably have been more appropriate.

*) using smallint key for client_inet is really dubious.  why not just
use the inet itself?

*) what is the audet table for?  Are you truly storing a record for
every field of every audited table?  This will be incredibly
efficient, especially for large, wide tables.

*) surely, creating a table called 'table' is not a good idea.

*) this approach obviously is a lot more complicated than hstore.
however, for 8.4 and down, hstore won't work. but, what about just
storing the record as text?

*) I can't quite follow the perl criteron steps -- what is happening
there?  What are the loops doing?

merlin

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Quick-and-Dirty Data Entry with LibreOffice3?
Next
From: pasman pasmański
Date:
Subject: Re: New feature: accumulative functions.