Re: Queries using rules show no rows modified?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Queries using rules show no rows modified?
Дата
Msg-id 28286.1021042653@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Queries using rules show no rows modified?  (Jan Wieck <janwieck@yahoo.com>)
Ответы Re: Queries using rules show no rows modified?  (Michael Alan Dorman <mdorman@debian.org>)
Список 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 по дате отправления:

Предыдущее
От: Jean-Michel POURE
Дата:
Сообщение: Re: pgAdmin2 to be included in Dev-C++
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Queries using rules show no rows modified?