Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E4E742E02AE for ; Tue, 11 Dec 2007 00:50:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 42227-06 for ; Tue, 11 Dec 2007 00:50:05 -0400 (AST) Received: from web31803.mail.mud.yahoo.com (web31803.mail.mud.yahoo.com [68.142.207.66]) by postgresql.org (Postfix) with SMTP id 553B32E02A7 for ; Tue, 11 Dec 2007 00:50:05 -0400 (AST) Received: (qmail 77159 invoked by uid 60001); 11 Dec 2007 04:50:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=L0UUhAiPmerGVD/gJkQzfDuUA4B1JEA8rhA3YV+mAp3vH1PmbaMRTkAilIpr7yVqSAP2pk4B3a5dbpYkoMARONXSqnC6nOI5cXt+aQCr2cc481MVnWjxw9oLBpBid/HMus0C5ZLi3fs/BPTkfy2sBu0rnyfHRnMMtZy6/tSgMsY=; X-YMail-OSG: bmv9LjoVM1mpISHKyFO4OsYF0gfiJJ0B4SxiU.OhE2lbsFnC2G7EYuoRJ6kq4uIROL.ju0OC.A-- Received: from [75.84.89.248] by web31803.mail.mud.yahoo.com via HTTP; Mon, 10 Dec 2007 20:50:02 PST X-Mailer: YahooMailWebService/0.7.162 Date: Mon, 10 Dec 2007 20:50:02 -0800 (PST) From: Richard Broersma Jr Subject: Re: Insert Rule, Multiple Insert, Update Problem To: pgsql-sql@postgresql.org, Scott In-Reply-To: <200712111423.52950.lists@mail.sael.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <152664.76353.qm@web31803.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/42 X-Sequence-Number: 29734 --- On Mon, 12/10/07, Scott wrote: > I am having trouble with an insert rule that also does an > update. It works > fine for a single insert but multiple inserts in a single > statement don't > behave as I expected. Yup, that is the limitation of rules. They are only useful if you issue statements that will only affect one tuple in a table at a time. If you want something different, you will have to use functions or triggers.