From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] proposal: psql command \graw |
Date: | 2017-12-04 08:29:44 |
Message-ID: | CAPpHfdtaEF+TrmA20YscbXBstO7dQpcA023tBEnR0B_JrwNRRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 4, 2017 at 11:21 AM, Alexander Korotkov <
a(dot)korotkov(at)postgrespro(dot)ru> wrote:
> The problem is that it's hard to read arbitrary formatted psql output from
> external program (not just gnuplot, but even especially written script). I
> made my scripts read few variations, but it doesn't look feasible to read
> all the combinations. For sure, it's possible to set format options inside
> macro, but then it would affect psql format options after execution.
>
> This is why I think only one \graw option is just fine, because it
> produces stable machine-readable output.
>
Oh, I just get that in current state of \graw doesn't produce good
machine-readable output.
# select '|', '|' \graw
|||
Column separator is character which can occur in values, and values aren't
escaped. Thus, reader can't correctly divide values between columns in all
the cases. So, I would rather like to see \graw to output in csv format
with proper escaping.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Adrien Nayrat | 2017-12-04 08:48:44 | Re: Doc tweak for huge_pages? |
Previous Message | Alexander Korotkov | 2017-12-04 08:21:43 | Re: [HACKERS] proposal: psql command \graw |