Re: Recording how a table is used - Mailing list pgsql-sql

From nha
Subject Re: Recording how a table is used
Date
Msg-id 4A547696.50704@free.fr
Whole thread Raw
In response to Re: Recording how a table is used  (nha <lyondif02@free.fr>)
List 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.



pgsql-sql by date:

Previous
From: nha
Date:
Subject: Re: Recording how a table is used
Next
From: Rob Sargent
Date:
Subject: Moving text columns, when it actually is large