REFRESH MATERIALIZED VIEW and completion tag output

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: REFRESH MATERIALIZED VIEW and completion tag output
Date: 2020-11-05 16:20:04
Message-ID: aadbfba9-e4bb-9531-6b3a-d13c31c8f4fe@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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.

OTOH, CREATE MATERIALIZED VIEW reports something like "SELECT NNN"
(NNN is the row count) as the completion tag output. If WITH NO DATA is
specified, "CREATE MATERIALIZED VIEW" is reported instead. Is it better
to make REFRESH MATERIALIZED VIEW do the similar thing? Or we should
not do that, for example, since changing the completion tag output may
break the client app?

[1] https://postgr.es/m/71f6bc72f8bbaa06e701f8bd2562c347@oss.nttdata.com

Regards,

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2020-11-05 16:56:43 Re: REFRESH MATERIALIZED VIEW and completion tag output
Previous Message Konstantin Knizhnik 2020-11-05 16:01:43 Re: libpq compression