Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Justin Pasher
-Original Message- From: Sven Willenberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 2:13 PM To: Justin Pasher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger on update On Tue, 2006-01-31 at 13:45 -0600, Justin Pasher

Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Sven Willenberger
On Thu, 2006-02-02 at 08:58 -0600, Justin Pasher wrote: -Original Message- From: Sven Willenberger [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 2:13 PM To: Justin Pasher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger

Re: [GENERAL] Best way to handle table trigger on update

2006-02-02 Thread Sven Willenberger
@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger on update On Tue, 2006-01-31 at 13:45 -0600, Justin Pasher wrote: Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side navigation

Re: [GENERAL] Best way to handle table trigger on update

2006-02-01 Thread Scott Ribe
I do something similar, and I have the front end generate updates to the position column of all rows, executed in a single transaction. Then you can fiddle around with the options and tradeoffs of how to ensure in the db that no update is accepted that violates the constraints... -- Scott Ribe

Re: [GENERAL] Best way to handle table trigger on update

2006-02-01 Thread Sven Willenberger
On Tue, 2006-01-31 at 13:45 -0600, Justin Pasher wrote: Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side navigation menu for a web site. Each menu item has a position column set that determines where to put the

[GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Justin Pasher
Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side navigation menu for a web site. Each menu item has a position column set that determines where to put the menu item in the display. At any given time, the menu items

Re: [GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Jim C. Nasby
You should be able to detect for the case where NEW.position OLD.position and ignore it, no? On Tue, Jan 31, 2006 at 01:45:09PM -0600, Justin Pasher wrote: Postgres 7.4.7 (I know, a little old, but we haven't had a chance to upgrade) I have a table that stores menu items for a side

Re: [GENERAL] Best way to handle table trigger on update

2006-01-31 Thread Justin Pasher
: Tuesday, January 31, 2006 4:01 PM To: Justin Pasher Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Best way to handle table trigger on update You should be able to detect for the case where NEW.position OLD.position and ignore it, no? On Tue, Jan 31, 2006 at 01:45:09PM -0600, Justin