Re: REFRESH MATERIALIZED VIEW and completion tag output

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REFRESH MATERIALIZED VIEW and completion tag output
Date: 2020-11-05 16:56:43
Message-ID: 27D6A53C-0F40-4515-853E-D986AEDB5674@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 5, 2020, at 8:20 AM, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
> The patch that makes pg_stat_statements track the number of rows that
> REFRESH MATERIALIZED VIEW command processes was proposed at [1].
> When reviewing the patch, I just wondered why the completion tag output
> for REFRESH MATERIALIZED VIEW doesn't include the row count. Is this
> an intentional behavior? I've not found the past discussion about this yet.

Of 191 command tags, only 7 return the number of rows. See src/include/tcop/cmdtaglist.h. REFRESH MATERIALIZED VIEW is similar to CREATE MATERIALIZED VIEW and also CREATE TABLE AS, which also do not return the row count. I think this behavior is historical, and preserved for compatibility.


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2020-11-05 17:11:52 Re: Yet another fast GiST build
Previous Message Fujii Masao 2020-11-05 16:20:04 REFRESH MATERIALIZED VIEW and completion tag output