From: | Adam Haberlach <adam(at)newsnipple(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Modification times in records? |
Date: | 2000-12-07 09:59:58 |
Message-ID: | 20001207015958.A7743@ricochet.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm looking for a generalized way to set a field to 'now'
whenever a record is updated.
First, I started creating a plpgsql function for each table that
I needed this for, and then using a trigger.
Later, I realized that the functions were all identical, so I
created one function, which lukily was always updating a field
with the same name.
I'm looking for a way to specify a field name when I create the
trigger, so I can have one function and assign it to any table
with any timestamp field and have it update automagically.
I can't seem to get a parameter into the function. Any ideas?
--
Adam Haberlach |A cat spends her life conflicted between a
adam(at)newsnipple(dot)com |deep, passionate, and profound for fish and
http://www.newsnipple.com|an equally deep, passionate, and profound
'88 EX500 |desire to avoid getting wet.
From | Date | Subject | |
---|---|---|---|
Next Message | Vilson farias | 2000-12-07 12:40:34 | little question |
Previous Message | Alfred Perlstein | 2000-12-07 09:33:16 | Re: Many postmasters... |