Re: [Solved] Generic logging system for pre-hstore using plperl triggers

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Diego Augusto Molina <diegoaugustomolina(at)gmail(dot)com>
Cc: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [Solved] Generic logging system for pre-hstore using plperl triggers
Date: 2011-09-27 20:25:00
Message-ID: CAHyXU0z8r1W_fTv1uD5Axii7QQ++PXERMt3C+Sbp+skDSiKtPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2011/9/27 Diego Augusto Molina <diegoaugustomolina(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2011-09-27 20:51:42 live metadata changes v8.3.4
Previous Message Rich Shepard 2011-09-27 20:19:54 Re: Quick-and-Dirty Data Entry with LibreOffice3?