Re: [SQL] rule for update view that updates/inserts into 2 tables

2008-04-15 Thread Chad Showalter
7; as c FROM my_table t; Does this seem reasonable to you? Do you problems with this approach? Thanks again for your help, Chad From: Robins Tharakan [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 8:34 PM To: Chad Showalter Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] r

Re: [SQL] rule for update view that updates/inserts into 2 tables

2008-04-14 Thread Robins Tharakan
Hi Chad, (Pardon me if I am shooting the stars here...) Don't you think that on each update, you would be creating a new row that satisfies that very given condition for the view ? By that I mean that when you do a 'UPDATE... WHERE my_table_id=1' the RULE now inserts another row with my_table_id

[SQL] rule for update view that updates/inserts into 2 tables

2008-04-14 Thread Chad Showalter
I would like to create a rule that, by updating a view, allows me to update one table and insert into another. The following example illustrates what I'm trying to do: --Create Tables CREATE TABLE my_table ( my_table_id serial, a character varying(255),