Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 117EF475B41 for ; Sat, 3 Aug 2002 14:33:52 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 81B7C475B1D for ; Sat, 3 Aug 2002 14:33:51 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1599555; Sat, 03 Aug 2002 11:33:50 -0700 From: "Josh Berkus" Subject: Re: Triggers for inserting on VIEWS To: Marc SCHAEFER , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Sat, 03 Aug 2002 11:33:50 -0700 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/59 X-Sequence-Number: 8905 Marc, > at least with PostgreSQL 7.1 it was possible to create a trigger on a > view. 7.2 seems to fail with: > > psql:t:25: ERROR: CreateTrigger: relation "egg_view" is not a > table > > is there any replacement so that inserting somewhere acts on multiple > tables ? Yes. Use the RULES system, which were a lot like triggers but are better tailored to deal with inserts and updates on VIEWs. See: http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/rules.html -Josh Berkus