By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

About tables

P: 129
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?
Apr 27 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 700
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.
Apr 27 '09 #2

P: 129
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.
Apr 28 '09 #3

Expert 100+
P: 700
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 :)
Apr 28 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.