Re: psql and tab-delimited output

Поиск
Список
Период
Сортировка
От Abelard Hoffman
Тема Re: psql and tab-delimited output
Дата
Msg-id CACEJHMgEXgL_qXRCfJ9X0CwdUTb1WhkrrEx8QyVmrOoJbQrtLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql and tab-delimited output  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
On Sun, Sep 7, 2014 at 5:17 PM, Melvin Davidson <melvin6925@gmail.com> wrote:
>the output I'd prefer is:
> id fld_1
> 1 test\tvalue
> 2 test\tvalue
> 3 >test\tvalue


Does this work for you?

copy (SELECT id, replace(fld_1, '    ', '\t') FROM tsv_test) to stdout  with csv header delimiter '    ';

Thank you, Melvin. Yes, I think that's what I'll do for the time-being, until COPY's TSV format supports HEADER.


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Querying a time range across multiple partitions
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Issue with to_timestamp function