Re: COPY FROM WHEN condition
От | Daniel Verite |
---|---|
Тема | Re: COPY FROM WHEN condition |
Дата | |
Msg-id | b66941d6-fb91-47a0-9e9e-a06075ffb58d@manitou-mail.org обсуждение исходный текст |
Ответ на | Re: COPY FROM WHEN condition (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: COPY FROM WHEN condition
|
Список | pgsql-hackers |
Pavel Stehule wrote: > > SELECT x.a, sum(x.b) > > FROM ( COPY INLINE '/path/to/foo.txt' FORMAT CSV ) as x( a integer, b > > numeric, c text, d date, e json) ) > > WHERE x.d >= '2018-11-01' > > > > > Without some special feature this example is not extra useful. It is based > on copy on server that can use only super user with full rights. And if superuser, one might use the file data wrapper [1] to get the same results without the need for the explicit COPY in the query. BTW, this brings into question whether the [WHEN condition] clause should be included in the options of file_fdw, as it supports pretty much all COPY options. Also, psql's \copy should gain the option too? [1] https://www.postgresql.org/docs/current/static/file-fdw.html Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления: