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

Re: UPDATE TRIGGER on view WAS: Re: Relation in tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: PFC <lists(at)boutiquenumerique(dot)com>
Cc: KeithW(at)narrowpathinc(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: UPDATE TRIGGER on view WAS: Re: Relation in tables
Date: 2005-02-16 21:39:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
PFC <lists(at)boutiquenumerique(dot)com> writes:
> You can create an ON UPDATE/INSERT trigger on a view which intercepts the  
> UPDATE/INSERT to the view (which would otherwise fail) and do whatever you  
> want with it, including doing the operation on the real table.

This might work for INSERT but I really doubt it'll work for UPDATE or

You may be able to make it work with rules, though there are lots of
pitfalls in that approach.

			regards, tom lane

In response to

pgsql-sql by date

Next:From: Michael FuhrDate: 2005-02-16 23:47:13
Subject: Re: Trigger
Previous:From: PFCDate: 2005-02-16 21:27:03
Subject: Re: Order of columns in a table important in a stored procedure?

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