public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: vignesh C <[email protected]>
Cc: Kirill Reshke <[email protected]>
Cc: jian he <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Michael Paquier <[email protected]>
Subject: Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
Date: Tue, 1 Apr 2025 07:27:24 -0700
Message-ID: <CAKFQuwZQFhkOR4VAZoH_Hd0OhCJx-mHW4dRFk1R7phjemvjbbg@mail.gmail.com> (raw)
In-Reply-To: <CALDaNm2OCk8kg6jeswYfCYTieAiO1RHe-D0ZxfL0XCV4dQ4YPA@mail.gmail.com>
References: <CACJufxHVxnyRYy67hiPePNCPwVBMzhTQ6FaL9_Te5On9udG=yg@mail.gmail.com>
	<[email protected]>
	<CACJufxGvy6QNMwZ5xd=L31F+4Rr6aXCASeMFyLZS+TVssK5+vA@mail.gmail.com>
	<CACJufxGZgh4oNV_8TqBwRoL+WFB2n3EqN97aMcuEmjuG+qm0qw@mail.gmail.com>
	<CACJufxHnyH4Zv+RtOABn8-1PjxkKch9R58dGhr+hCnV0LmNxSQ@mail.gmail.com>
	<CALdSSPgsgC_CGDjTyzu=1FAbuavTRsGFDnnm7ufGuWcd29QUHQ@mail.gmail.com>
	<CACJufxE35HxSMqG6su0txZwOLpbnBsDBav5eigxt6L8Nk8bJwQ@mail.gmail.com>
	<CALdSSPi3Gb=fi0ZCoJhAp3HQYKJmiCShcX4xMcUBSL0s5byBXQ@mail.gmail.com>
	<CAKFQuwbs61rxxCUVhECLSq4Xrz9s54dD2TzhX58d7+6WcC8dpA@mail.gmail.com>
	<[email protected]>
	<CAKFQuwbD775kSHFfyF3shu+XMTX=3SEH+_JYLOWvrPo3y5dK-w@mail.gmail.com>
	<[email protected]>
	<CAKFQuwaMFiNGhk-F+TG4uVjiAfFwar6t+7fUc0mKDz55DGODcw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CACJufxF3noNs9O6O3fL783h2-Sy1wfJb=0H+WMFmOLuhkfJw8w@mail.gmail.com>
	<CALDaNm3_oLZK=L6Si3JXDh7fL+NurF07CHtABPkhFOZ9xmsYZg@mail.gmail.com>
	<CALdSSPiNtJMQFhSWSJnkwqwTkDAe3nqTjZ2yqs9jZVC6SYh6FA@mail.gmail.com>
	<CALDaNm2OCk8kg6jeswYfCYTieAiO1RHe-D0ZxfL0XCV4dQ4YPA@mail.gmail.com>

On Tue, Apr 1, 2025 at 6:52 AM vignesh C <[email protected]> wrote:

>
> We are not changing the existing behavior. However, since copying data
> from large tables can take a significant amount of time, would it be
> helpful to add a cautionary note advising users to refresh the
> materialized view before running copy command to avoid stale data?
>
>
No, for the same reason the caveat about WITH NO DATA need not be mentioned
either.  These are the inherent properties/trade-offs of using a
materialized view versus a normal view.  They are discussed when talking
about the creation and usage of materialized views specifically.  Features
that interact with materialized views consistent with these two documented
properties do not need to point out that fact. i.e., the existing
non-documenting of those two points in SELECT is appropriate, and should be
emulated in COPY.  The output doesn't change if you write "copy table"
instead of "copy (select * from table)" so nothing needs to be pointed out.

David J.


view thread (29+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
  In-Reply-To: <CAKFQuwZQFhkOR4VAZoH_Hd0OhCJx-mHW4dRFk1R7phjemvjbbg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox