Skip site navigation (1) Skip section navigation (2)

Re: can I update multiple table at a time?

From: Jagadeesh <mnjagadeesh(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: can I update multiple table at a time?
Date: 2008-10-10 07:54:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi Julius Tuskenis,

Many thanks for helping me.  These are good solutions. But I have some
Look below

On Oct 10, 11:06 am, jul(dot)(dot)(dot)(at)nsoft(dot)lt (Julius Tuskenis) wrote:

> I would suggest you 2 solutions:
>   1. to use a function to edit these fields. That way you will be sure
> that you will not forget to update both tables.
>   2. use a trigger on master table. If I understand you - the history
> table could be filled using trigger, when data in master table changes.
> That way you could change only master table in your application.
I think having triggers would bring performance down. So instead can
we have single
sql update statement to update all four fields of  two tables? Just a
crazy idea.

> Good luck!
Thanks for the wish.
These wishes needed to implement smart solution to above problem :)

In response to


pgsql-admin by date

Next:From: JagadeeshDate: 2008-10-10 07:57:25
Subject: Re: logging SQL statements
Previous:From: JagadeeshDate: 2008-10-10 07:46:40
Subject: Re: how to invoke edtor?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group