Connecting Tech Pros Worldwide Help | Site Map

About tables

  #1  
Old April 27th, 2009, 09:08 AM
Member
 
Join Date: Sep 2007
Posts: 121
Hi friends,
I have one big doubt, when we update a table by inserting or deleting or modifying and those modifications we can store by \s <some filename>, by executing this command in the prompt of database, then it stores the commands whatever we have done till now in database prompt into that filename. But if we do modifications by a perl program, then how can we know which table is modified in which time?

My configuration is perl,postgresql,apache,Ubuntu 6.06 as Operating system.

So please help me?
  #2  
Old April 27th, 2009, 09:40 PM
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 290

re: About tables


You can parse postgresql logs (first configure it) and look for sql DML queries, or you can define triggers on tables which can store,probably into another table, all queries you did.
  #3  
Old April 28th, 2009, 08:15 AM
Member
 
Join Date: Sep 2007
Posts: 121

re: About tables


Hi friend,
i am poor in configuring and do management, so can u please tell me elaborately, if u provide commands also it will be helpful to me.
  #4  
Old April 28th, 2009, 09:57 AM
Moderator
 
Join Date: Dec 2006
Location: Europe
Posts: 290

re: About tables


It depends if you want to change your database structure and define some triggers and new table for logs or not. In my opinion triggers are better than parsing log files.
If you want to parse log file firstly you need to configure postgres to put logs into file (it is not the default behaviour). You can configure it in postgresql.conf file. But you'll also need a soft called log analyzer (you can write it by yourself with perl language or search the internet, there are some) which will scan log file.

As i said better solution would be triggers. You don't need any new soft you only have to create triggers for tables you want to log and add new log table in which you will put logs.

I can help you with triggers, log analyzer you can download.


Sorry for english :)
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question(s) about tables and primary key spk answers 4 July 17th, 2007 10:42 PM
Information about tables in database. Suyash Upadhyay answers 4 March 26th, 2007 01:26 PM
Questions about tables upsized db from access to sql Mike answers 12 November 13th, 2005 04:03 PM
A question about tables Mr. Teatime answers 5 July 23rd, 2005 01:17 PM
PHP/MySQL Query about tables JV answers 4 July 17th, 2005 09:28 AM