Re: [GENERAL] Generic timestamp function for updates where field

2007-01-03 Thread novnov
Thanks, that did it, and I'd not seen that set of docs yet, should be helpful. -- View this message in context: http://www.nabble.com/Generic-timestamp-function-for-updates-where-field-names-vary-tf2899327.html#a8155138 Sent from the PostgreSQL - general mailing list archive at Nabble.com. --

Re: [GENERAL] Generic timestamp function for updates where field

2007-01-03 Thread Adrian Klaver
On Wednesday 03 January 2007 9:10 am, novnov wrote: > Adrian Klaver wrote: > > On Wednesday 03 January 2007 12:13 am, novnov wrote: > >> Adrian Klaver wrote: > >> > On Sunday 31 December 2006 8:48 am, novnov wrote: > >> >> OK. python would be the preference, if anyone is interested in > >> >> showi

Re: [GENERAL] Generic timestamp function for updates where field

2007-01-03 Thread novnov
Adrian Klaver wrote: > > On Wednesday 03 January 2007 12:13 am, novnov wrote: >> Adrian Klaver wrote: >> > On Sunday 31 December 2006 8:48 am, novnov wrote: >> >> OK. python would be the preference, if anyone is interested in showing >> >> me how it would be done, I've never used one of the dyn

Re: [GENERAL] Generic timestamp function for updates where field

2007-01-03 Thread Adrian Klaver
On Wednesday 03 January 2007 12:13 am, novnov wrote: > Adrian Klaver wrote: > > On Sunday 31 December 2006 8:48 am, novnov wrote: > >> OK. python would be the preference, if anyone is interested in showing > >> me how it would be done, I've never used one of the dynamic languages > >> with postgres

Re: [GENERAL] Generic timestamp function for updates where field

2007-01-03 Thread novnov
Adrian Klaver wrote: > > On Sunday 31 December 2006 8:48 am, novnov wrote: >> OK. python would be the preference, if anyone is interested in showing me >> how it would be done, I've never used one of the dynamic languages with >> postgres. >> >> Why would not be possible in plpgsql? It has loop

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread novnov
Thanks Adrian, I'll see what I can do with that, I'll learn a lot by going through what you've done. Adrian Klaver wrote: > > On Sunday 31 December 2006 8:48 am, novnov wrote: >> OK. python would be the preference, if anyone is interested in showing me >> how it would be done, I've never used o

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread novnov
Yes thanks that does make it clear. Martijn van Oosterhout wrote: > > On Sun, Dec 31, 2006 at 08:48:07AM -0800, novnov wrote: >> Why would not be possible in plpgsql? It has loop etc, the only part I'm >> not >> sure it can do it use the variable as field name. > > The "dynamic" in dynamic lan

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread Adrian Klaver
On Sunday 31 December 2006 8:48 am, novnov wrote: > OK. python would be the preference, if anyone is interested in showing me > how it would be done, I've never used one of the dynamic languages with > postgres. > > Why would not be possible in plpgsql? It has loop etc, the only part I'm > not sure

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread Martijn van Oosterhout
On Sun, Dec 31, 2006 at 08:48:07AM -0800, novnov wrote: > Why would not be possible in plpgsql? It has loop etc, the only part I'm not > sure it can do it use the variable as field name. The "dynamic" in dynamic language usually refers to dynamic typing. pl/pgsql is a strictly typed language which

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread novnov
When responding just now I mentioned loops because another issue I'm working on involves those, loops wouldn't be involved here. novnov wrote: > > OK. python would be the preference, if anyone is interested in showing me > how it would be done, I've never used one of the dynamic languages with

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread novnov
OK. python would be the preference, if anyone is interested in showing me how it would be done, I've never used one of the dynamic languages with postgres. Why would not be possible in plpgsql? It has loop etc, the only part I'm not sure it can do it use the variable as field name. David Fetter

Re: [GENERAL] Generic timestamp function for updates where field names vary

2006-12-30 Thread David Fetter
On Sat, Dec 30, 2006 at 10:33:01AM -0800, novnov wrote: > > The pagila database has generic trigger function called last_updated() (shown > below) which is used to update timestamp columns in various tables. The > reason I can't use the function 'as is' for my own purposes is that in my > app the

[GENERAL] Generic timestamp function for updates where field names vary

2006-12-30 Thread novnov
The pagila database has generic trigger function called last_updated() (shown below) which is used to update timestamp columns in various tables. The reason I can't use the function 'as is' for my own purposes is that in my app the timestamp fields are not all named alike. The field names do follo