[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22

Hello there,

I am a total novice to Postgresql, but very much interested in learning how
it works.

I have to modify the source code of Postgresql-9.0.1 such that whenever I
run an UPDATE command it should print out the old and new tuples. Since I am
a beginner I would appreciate it a lot if anyone of you out there could
point me in right direction. Which files will I need to modify to get the
desired results? 
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Modfying-source-code-to-read-tuples-before-and-after-UPDATE-how-to-tp3251651p3251651.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22

Hello there,

I am a total novice to Postgresql, but very much interested in learning how
it works.

I have to modify the source code of Postgresql-9.0.1 such that whenever I
run an UPDATE command it should print out the old and new tuples. Since I am
a beginner I would appreciate it a lot if anyone of you out there could
point me in right direction. Which files will I need to modify to get the
desired results?
 
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Modfying-source-code-to-read-tuples-before-and-after-UPDATE-how-to-tp3251612p3251612.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22

Well what i mean by print out is that it should print out the old and new
tuples on postgres terminal after the update is complete. 
I tried it with triggers and I got what I wanted. But my professor for some
reason wants me to mess around with the source code :( 
Do you think it's possible?



-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Modfying-source-code-to-read-tuples-before-and-after-UPDATE-how-to-tp3251651p3252085.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


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

2010-11-17 Thread rmd22

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.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: Storing old and new tuple values after an UPDATE, INSERT or DELETE

2010-11-17 Thread rmd22

Yes I have tried it with triggers but I have to do it without using triggers.
Since in my workplace someone has already done that and for some reason (may
be because triggers are expensive i suppose...not sure though), hence they
want me to do it by modifying the source code.
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Storing-old-and-new-tuple-values-after-an-UPDATE-INSERT-or-DELETE-tp3269108p3269213.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: Storing old and new tuple values after an UPDATE, INSERT or DELETE

2010-11-17 Thread rmd22

Yes it's the "performance issue". 
I am going to talk to them about the triggers tomorrow. 
On the other hand I would still like to know if it is possible to do it by
modifying the execMain.c or nodeModifyTable.c files?
And also what about fast path interface? Is it possible to use it instead? 
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Storing-old-and-new-tuple-values-after-an-UPDATE-INSERT-or-DELETE-tp3269108p3269442.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general