Re: Rule updates and PQcmdstatus() issue - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Rule updates and PQcmdstatus() issue
Date
Msg-id 1031647158.24998.45.camel@taru.tm.ee
Whole thread Raw
In response to Re: Rule updates and PQcmdstatus() issue  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Responses Re: Rule updates and PQcmdstatus() issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2002-09-09 at 21:25, Ross J. Reedstrom wrote:
> And this has got to be trolling: PostgreSQL is one of the _most_
> stability and correctness focused software projects I've ever known. In
> this particular case, the complaints about this issue where "Your bugfix
> broke my tool! make it better!" The answer was "We can't just put it
> back, that's an actual bug in there (rules firing in an unpredicatable
> order).

Why is "rules firing in an unpredicatable order" a bug but "returned
affected tuple count is wrong " just a compatibility issue ?

Afaik, rule firing order has never been promised, while pqCmdTuples()
has.

> What's the _correct_ behavior?" The people with the complaints
> then did not come up with a compelling, complete description of what
> the correct behavior should be. There's always been vague parts to the
> "desired behavior" like the phrase Tom pointed out: "in the context of
> the view" which was clarified to mean "viewable by the view", which is
> nearly impossible to code, if not an example of the halting problem.

One approach could be to expose the tuple count at SQL level and then
let the user decide what to return.

> PostgreSQL as a project errs on the side of not coding the quick fix,
> in favor of waiting for the right answer. Sometimes too long, but this
> case isn't one of those, IMHO.

You usually learn afterwards when it has been "too long" ;)

--------------
Hannu



pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Proposal: Solving the "Return proper effected tuple
Next
From: "Dave Page"
Date:
Subject: Re: Optimization levels when compiling PostgreSQL...