Re: [GENERAL] rules on INSERT can't UPDATE new instance?

2000-06-13 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Is the INSERT rule re-ordering mentioned a TODO item? Darn if I know. I threw the thought out for discussion, but didn't see any comments. I'm not in a hurry to change it, unless there's consensus that we should. regards, tom

Re: [GENERAL] rules on INSERT can't UPDATE new instance?

2000-06-13 Thread Bruce Momjian
Is the INSERT rule re-ordering mentioned a TODO item? > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I thought an INSERT rule with an UPDATE action would work on the same > > table, but that fails. Seems the rule is firing before the INSERT > > happens. > > Yes, a trigger is the right way to d

Re: [GENERAL] rules on INSERT can't UPDATE new instance?

2000-05-21 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > I thought an INSERT rule with an UPDATE action would work on the same > > table, but that fails. Seems the rule is firing before the INSERT > > happens. > > Yes, a trigger is the right way to do surgery on a tuple before it is > stored. Rules are

Re: [GENERAL] rules on INSERT can't UPDATE new instance?

2000-05-20 Thread Stephan Szabo
ECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 20, 2000 2:00 AM Subject: [GENERAL] rules on INSERT can't UPDATE new instance? > > From the create_rule man page this example is offered: > > CREATE RULE example_5 AS >ON INERT TO emp WHERE new.salary >

[GENERAL] rules on INSERT can't UPDATE new instance?

2000-05-20 Thread Louis-David Mitterrand
From the create_rule man page this example is offered: CREATE RULE example_5 AS ON INERT TO emp WHERE new.salary > 5000 DO UPDATE NEWSET SET salary = 5000; But what is "NEWSET"? Is it a keyword? My problem is that on an insert with an invalid amount I try t