Storing old and new tuple values after an UPDATE, INSERT or DELETE

From: rmd22 <rohit(dot)dhamane(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Storing old and new tuple values after an UPDATE, INSERT or DELETE
Date: 2010-11-17 14:26:06
Message-ID: 1290003966479-3269108.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Is it possible to modify source code in executor to keep a log of old tuples
and new tuples after an UPDATE, INSERT or DELETE command is executed? (so
basically Store Old Tuple Values -> UPDATE/INSERT/DELETE Command -> Store
New Tuple Values)

For example is it possible to modify the execMain.c file in
backend/executor/ such that before the ExecutorRun you save the tuples in a
log file and after running ExecutorRun you log the new tuples also.
How can this be achieved (if at all possible)?
If it is not possible to do this by modifying execMain.c file how else can
I do it? (may be nodeModifyTable.c)

Please correct me if my understanding is wrong. I am new to Postgresql and
to source code programming specially.
I would really appreciate it a lot. Thank you in advance.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Storing-old-and-new-tuple-values-after-an-UPDATE-INSERT-or-DELETE-tp3269108p3269108.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2010-11-17 14:28:13 clarification regarding max_standby_streaming_delay
Previous Message Tony Caduto 2010-11-17 14:09:30 Re: The first dedicated PostgreSQL forum