Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECTstatements

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECTstatements
Дата
Msg-id 54fa2fec-b133-0fc0-4227-3e308ba68812@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECTstatements  (legrand legrand <legrand_legrand@hotmail.com>)
Ответы Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECTstatements
Список pgsql-bugs

On 2020/03/28 2:43, legrand legrand wrote:
> Thank you for those answers !
> 
>> The utility commands that return CMDTAG_SELECT are
>> only CREATE TABLE AS SELECT and CREATE MATERIALIZED VIEW?
>> I'd just like to confirm that there is no case where "rows" must not
>> be counted when CMDTAG_SELECT is returned.
> 
> I don't have any in mind ...

I found that SELECT INTO also returns CMDTAG_SELECT.

> 
>> BTW, "rows" should be updated when FETCH or MOVE is executed
>> because each command returns or affects the rows?
> 
> Yes they should, but they aren't yet (event with CMDTAG_SELECT added)
> 
> Note that implicit cursors behave the same way ;o(

Thanks for confirming this!

Attached is the patch that makes pgss track the total number of rows
retrieved or affected by CREATE TABLE AS, SELECT INTO,
CREATE MATERIALIZED VIEW and FETCH. I think this is new feature
rather than bug fix, so am planning to add this patch into next CommitFest
for v14. Thought?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bert Brezel
Дата:
Сообщение: Re: BUG #16341: Installation with EnterpriseDB Community installer inNT AUTHORITY\SYSTEM context not possible
Следующее
От: John Muehlhausen
Дата:
Сообщение: NOTIFY in multi-statement PQexec() not sent outside of transaction