A trigger did work, thank you for that suggestion.
In a race situation, there really is no manual solution either
I sent in a bug report for the rule problem that I experienced.
Sim
Tom Lane wrote:
Martijn van Oosterhout writes:
I don't think rules can do what you want.
A trigger might work
Martijn van Oosterhout writes:
> I don't think rules can do what you want.
A trigger might work, ignoring the problem of race conditions between
two inserts happening concurrently (which a rule can't handle either).
regards, tom lane
---(end of br
I misunderstood you.
What you are saying is that since the insert is done first and then the update when it gets to the
update it checks the rule and even though it wasn't valid when the statement was executed, it is
valid at the time of execution and therefore it runs.
I have tried another te
I would think the rule qualification would tell the system not to run the rule in the event that it
does not meet the qualification. According to the docs:
What is a rule qualification? It is a restriction that tells when the actions of the rule
should be done and when not. This qualification
On Tue, Mar 13, 2007 at 02:15:01PM +0200, Sim Zacks wrote:
> select version()
> "PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC
> i686-pc-linux-gnu-gcc (GCC) 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3,
> pie-8.7.7.1)"
>
> I am sure that I must have missed something here because I read th
Curtis Scheer <[EMAIL PROTECTED]> writes:
> However, when I try to insert a record into foo with any other value besides
> 1 it actually inserts the record but doesn't return the # of rows affected.
Works for me:
regression=# create table foo (foovalue int);
CREATE TABLE
regression=# CREATE OR RE
On Fri, Sep 01, 2006 at 08:22:44AM -0500, Curtis Scheer wrote:
> I'm trying to prevent any further input of a particular field value via an
> insert rule with the following rule.
> Basically the stored procedure that it calls raises an exception. The
> behavior I wanted\excepted was to call the
On Sat, May 13, 2006 at 02:11:14PM -0700, Karen Hill wrote:
> I'm having a bit of mystery in solving a postgresql puzzle. I have a
> table that when it gets inserted or updated or deleted it is logged
> into a log table. The log table contains who (current_user) did the
> insert/update/delete the
Justin Tocci <[EMAIL PROTECTED]> writes:
> Thanks for the reply Tom, here's the rule that works:
> CREATE RULE tquotehistory_update AS ON UPDATE TO vtquotehistory DO INSTEAD
> (
> INSERT INTO tquotehistory_log ("ID", "Item", "Quote1", "DemandCost1",
> "Quote2", "DemandCost2", "DueDate", "POIntoI
You are correct Tom, vtquotehistory is a view of tquotehistory, and I am
trying to log in this example. Sorry I didn't point that out. The view is a
straight view with no WHERE clause or criteria of any kind. The UPDATE does
cause the OLD record to become updated to whatever changes have been set a
10 matches
Mail list logo