Re: [HACKERS] proposal: psql command \graw - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] proposal: psql command \graw
Date
Msg-id 3576.1512165565@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] proposal: psql command \graw  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2017-12-01 16:36 GMT+01:00 Robert Haas <robertmhaas@gmail.com>:
>> I vote to reject this patch.  It doesn't do anything that you can't
>> already do; it just adds some syntactic sugar.  And that syntactic
>> sugar saves only a handful of keystrokes.  If you want unaligned,
>> tuples-only mode, you can set it in 5 keystrokes:

> When you don't want to see column names, then it is true.

If this is "\a\t except we aren't removing column headers", then it
seems like "\graw" is a remarkably misleading name for the functionality.
I'd been assuming, from reading no more than the patch subject line,
was that it was something like "dump the raw field data with no headers,
footers, or separators", with a claimed use-case involving passing bytea
data to some consumer or other.

FWIW, I concur with Robert's assessment, both that the use-case is pretty
thin and that we do not want to get into the business of encouraging a
boatload of \gxxx variants, especially not ones with randomly chosen names.

> For some usage - like printing via gnuplot you would to see column names -
> and it cannot be done with current settings.

That seems like an argument for new pset option(s) to suppress footers
but not headers.  It's not an argument for invoking such options through
a \g variant; that's totally non-orthogonal.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Ildus Kurbangaliev
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Tom Lane
Date:
Subject: Re: Protect syscache from bloating with negative cache entries