Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Record Insertion/Update time

Posted on 2002-05-22
8
Medium Priority
?
234 Views
Last Modified: 2008-03-10
Is there a way to get the last record insert/update time in RDBMS. I am specifically looking if PostgreSQL database has a way to provide me this.

I know i can code for this in my every UPDATE/INSERT statement. But if i database can provide me this for every record without me doing any coding that would be great.

Help !!
0
Comment
Question by:Jitu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 150 total points
ID: 7026443
Unless you implement a strategy to log this, you don't have this information by the database.
Many database systems have some kind of transaction log, but performing an analysis of this takes huge time and often requires some tools...

Ususally, you use some kind of triggers, but I would have to look up how/if this works in PostgrSQL.

CHeers
0
 
LVL 1

Author Comment

by:Jitu
ID: 7026616
i think "last record insert/update time" is not clear enough.

What i mean is - for any record in the database i should be able to find out when was the record last updated.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7026627
You have to store this information per row... again, this is not implemented by default, so you need to implement this on your own...
CHeers
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 2

Expert Comment

by:vbDoc
ID: 7027425
The accepted method is to use a trigger on UPDATE to put an entry in a LOG table. Then a simple SQL statement to find the entry.

Regards
0
 
LVL 1

Author Comment

by:Jitu
ID: 7028819
So u mean i would have to put a trigger on update on all my  tables in the database ?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7028979
Absolutely...
0
 
LVL 1

Author Comment

by:Jitu
ID: 7029005
Thanks Angel !!!
Oh the strange ways of Databases. !
0
 
LVL 1

Author Comment

by:Jitu
ID: 7029006
if PostgreSQL has a facility do let me know. I don;t think it would have !
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question