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

From Fabien COELHO
Subject Re: [HACKERS] proposal: psql command \graw
Date
Msg-id alpine.DEB.2.20.1708240849080.2606@lancre
Whole thread Raw
In response to Re: [HACKERS] proposal: psql command \graw  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] proposal: psql command \graw
List pgsql-hackers
>> "column_header" is somehow redundant with "tuples_only". Use the
>> existing one instead of adding a new one?
>
> It is different - a result of tuples_only is just tuples - not column
> names, not title, footer. I needed new special flag for enhancing
> tuples_only to print column names

I do not understand. If you keep the special print_raw function, it can 
use tuples_only as true for without column names, and false for with 
column names?

>> More generally, ISTM that the same effect could be achieved without
>> adding a new print function, but by setting more options (separator,
>> ...) and calling an existing print function. If so, I think it would
>> reduce the code size.
>
> Maybe, maybe not. removing PRINT_RAW you need to enhance PRINT_UNALIGNED to
> use one shot parameters and you have to teach it to print column names in
> tuples_only mode. The code's length will be same. The form of this patch is
> not final.

Hmmm. Ok. It depends on the change implication on the print unaligned 
function.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Douglas Doole
Date:
Subject: Re: [HACKERS] [PATCH] Push limit to sort through a subquery
Next
From: Torsten Zuehlsdorff
Date:
Subject: Re: [HACKERS] Thoughts on unit testing?