Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
От | David G. Johnston |
---|---|
Тема | Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query). |
Дата | |
Msg-id | CAKFQuwZQFhkOR4VAZoH_Hd0OhCJx-mHW4dRFk1R7phjemvjbbg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query). (vignesh C <vignesh21@gmail.com>) |
Список | pgsql-hackers |
On Tue, Apr 1, 2025 at 6:52 AM vignesh C <vignesh21@gmail.com> 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.
В списке pgsql-hackers по дате отправления: