Re: Queries using rules show no rows modified? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Queries using rules show no rows modified?
Date
Msg-id 28286.1021042653@sss.pgh.pa.us
Whole thread Raw
In response to Re: Queries using rules show no rows modified?  (Jan Wieck <janwieck@yahoo.com>)
Responses Re: Queries using rules show no rows modified?
List pgsql-hackers
Jan Wieck <janwieck@yahoo.com> writes:
>     IMHO  the  answer  should  only  be a number if the rewritten
>     querytree list consists of one  query  of  the  same  command
>     type.  everything else has to lead into "unknown".

I think you can easily generalize that to the statement that the
result should be the sum of the rewritten operations of the same
type as the original query; requiring there to be exactly one
seems overly restrictive.

Michael seems to feel that the tuple count should be nonzero if any
of the replacement operations did anything at all.  This does not make
a lot of sense at the command tag level ("UPDATE 4" might not mean
that 4 tuples were updated) but if you look at the definition of
PQcmdTuples ("returns the number of rows affected by the SQL command")
it's not so unreasonable.  And I can see the point of wanting to
know whether anything happened.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: pgAdmin2 to be included in Dev-C++
Next
From: Tom Lane
Date:
Subject: Re: Queries using rules show no rows modified?