update tables with instead of trigger after update of view

garret <[email protected]>
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <[email protected]>
Hi I have views created from several tables. I would like to create a
function with Plpgsql that updates the underlying tables rather than the
view with a do instead trigger. I have been able to get a working example of
what I want in the link below. The thing is, I would rather try to create a
more dynamic function instead of creating an if statement for each column.

Here's my  sql fiddle <http://sqlfiddle.com/#!17/d63dc/2>   where I show the
end result of what I would like to happen but with a more manual approach of
hard coding in the column and table to update.

I have also posted on  DBA stackexchange
<https://dba.stackexchange.com/questions/198412/automate-update-columns-in-a-view-with-trigger-function-in-plpgsql>  
but got no responses I was hoping someone on this forum could help, or let
me know if this is not realistically possible.

Thank you



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-sql-f2142323.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.