Re: Recording how a table is used

From: nha <lyondif02(at)free(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Recording how a table is used
Date: 2009-07-08 10:36:06
Message-ID: 4A547696.50704@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

Le 8/07/09 11:30, nha a écrit :
> Hello,
>
> Le 30/06/09 8:47, Daniel Gordon a écrit :
>> I'm trying to record the results of a select statement into a separate
>> table. I need the information selected, the column it was stored in,
>> the table it was stored in, and the query that selected it.
>> [...]
>> Here is the table I'm trying to fill, in case it is useful
>>
>> create table sql_query_data_log (
>> id serial,
>> create_ time timestamp DEFAULT now(),
>> query varchar,
>> table text,
>> column text,
>>
>> data varchar
>> );
>> [...]
> Another crude alternative may be based on triggers as you mentioned.
> Triggers may be created on each table for each possible triggered event
> (before, after).
> [...]

Rules may be also appropriate (more than triggers?). This page gives
some examples:
http://www.postgresql.org/docs/8.3/interactive/rules-update.html

Regards.

--
nha / Lyon / France.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2009-07-08 21:19:26 Moving text columns, when it actually is large
Previous Message nha 2009-07-08 09:30:16 Re: Recording how a table is used