X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5FF748B9B74 for ; Wed, 16 Feb 2005 21:19:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53182-08 for ; Wed, 16 Feb 2005 21:19:01 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id B09788B9B27 for ; Wed, 16 Feb 2005 21:19:01 +0000 (GMT) Received: (qmail 24381 invoked from network); 16 Feb 2005 22:19:34 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 16 Feb 2005 22:19:34 +0100 To: KeithW@narrowpathinc.com, pgsql-sql@postgresql.org Subject: Re: UPDATE TRIGGER on view WAS: Re: Relation in tables References: <20050216134301.5myrfpr3ck6bmswc@www.presserv.org> <20050216204358.M29214@narrowpathinc.com> Message-ID: Date: Wed, 16 Feb 2005 22:22:57 +0100 From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <20050216204358.M29214@narrowpathinc.com> User-Agent: Opera M2/7.54u1 (Linux, build 892) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/181 X-Sequence-Number: 20292 > And all this time I thought that you couldn't write to a view. You can't. But you can make it seem so you can. 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. Search for "postgresql materialized views" for some examples.