Re: psql and tab-delimited output

From: Abelard Hoffman <abelardhoffman(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql and tab-delimited output
Date: 2014-09-08 21:46:16
Message-ID: CACEJHMgEXgL_qXRCfJ9X0CwdUTb1WhkrrEx8QyVmrOoJbQrtLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Sep 7, 2014 at 5:17 PM, Melvin Davidson <melvin6925(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-09-08 21:47:27 Re: Issue with to_timestamp function
Previous Message Jeff Janes 2014-09-08 21:40:52 Re: Querying a time range across multiple partitions