Re: Alternative to \copy in psql modelled after \g

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Alternative to \copy in psql modelled after \g
Дата
Msg-id b43fdc08-35d2-43f5-9307-76dc3da3f4f1@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Alternative to \copy in psql modelled after \g  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: Alternative to \copy in psql modelled after \g  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
    Fabien COELHO wrote:

> > It does not add "unless the query is a COPY", so it seems right
> > to make that just work, and call it a bug fix.
>
> Does this suggest backpatching?

Yes, I think it's a candidate for back-patching.

> > There is a precedent in regress/sql/hs_standby_allowed.sql doing:
> >
> >  COPY hs1 TO '/tmp/copy_test'
> >  \! cat /tmp/copy_test
>
> Indeed. I'm unsure windows has cat or /tmp, so I do not understand how it
> works on such platform. Maybe I'm missing something.

It's exercised only on a standby. Possibly few machines run this test,
among which none powered by Windows? And maybe it even works
on Windows in some cases: the reference to /tmp would work
in an MSYS/MingW environment and "cat" might too if \! gets
to the /bin/sh of that environment.

> However TAP tests do that, and I have used this extensively with pgbench,
> so a psql TAP test could do that and other things, such as importing a csv
> file or whatever.

It looks a significant step forward, to be brought by a patch on its own
without prospect of being back-patched.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


В списке pgsql-hackers по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Следующее
От: David Steele
Дата:
Сообщение: Re: could recovery_target_timeline=latest be the default in standbymode?