Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > which column ha...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 3487 of 3799
Post > Topic >>

which column has changed?

by Dizzy <rwojtowicz@[EMAIL PROTECTED] > May 28, 2008 at 01:15 PM

Hi,
I have a table, say "customers" which is triggered, so before each
update, the previous version of the record goes to "customers_history"
with date of insert. So in "customers_history" I could have records
like:

cutomer_ID first_name last_name country creationdate
--------------------------------------------------------------------
1 John Doe USA 2008-01-01
2 Jack Smith UK 2008-03-21
1 John Doe Australia 2008-04-15

And i have to make a re****t with date of last modification and
information WHAT WAS MODIFIED.
So I would like to get:
cutomer_ID date what_changed
---------------------------------------------
1 2008-04-15 country

I haven't found any way to fetch through column names in plpgsql. Is
there any language in which I could write such function?
 




 5 Posts in Topic:
which column has changed?
Dizzy <rwojtowicz@[EMA  2008-05-28 13:15:57 
Re: which column has changed?
jerryji <jerryji1976@[  2008-05-28 19:17:49 
Re: which column has changed?
Dizzy <rwojtowicz@[EMA  2008-05-28 23:20:22 
Re: which column has changed?
"Andreas Sakowski&qu  2008-05-29 13:09:54 
Re: which column has changed?
TrialUser <trial@[EMAI  2008-06-03 00:38:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:44:31 CST 2008.