Re: Insert Rule, Multiple Insert, Update Problem

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org, Scott <lists(at)mail(dot)sael(dot)com(dot)au>
Subject: Re: Insert Rule, Multiple Insert, Update Problem
Date: 2007-12-11 04:50:02
Message-ID: 152664.76353.qm@web31803.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- On Mon, 12/10/07, Scott <lists(at)mail(dot)sael(dot)com(dot)au> 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2007-12-11 06:00:12 Re: join on three tables is slow
Previous Message Gerry Reno 2007-12-11 04:24:59 Re: join on three tables is slow