Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
От | jian he |
---|---|
Тема | Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query). |
Дата | |
Msg-id | CACJufxE35HxSMqG6su0txZwOLpbnBsDBav5eigxt6L8Nk8bJwQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query). (Kirill Reshke <reshkekirill@gmail.com>) |
Ответы |
Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).
|
Список | pgsql-hackers |
On Thu, Mar 27, 2025 at 3:04 AM Kirill Reshke <reshkekirill@gmail.com> wrote: > > > > hi. > > patch attached. > > also cc to Tom, > > since at that time, you are against the idea of ``COPY matview TO``. > > Hi! With this patch it is possible to COPY matview TO, but not regular > view, which is surprising. Let's fix that? create view v1 as select 1; copy v1 to stdout; if you specifying table name, not query, then { cstate = BeginCopyTo(pstate, rel, query, relid, stmt->filename, stmt->is_program, NULL, stmt->attlist, stmt->options); *processed = DoCopyTo(cstate); /* copy from database to file * } will use {table_beginscan, table_scan_getnextslot, table_endscan} to output the data. but views don't have storage, table_beginscan mechanism won't work. so i don't think this is possible for view.
В списке pgsql-hackers по дате отправления: