Jan Wieck <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster