Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki - Mailing list pgsql-hackers

From Ideriha, Takeshi
Subject Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Date
Msg-id 4E72940DA2BF16479384A86D54D0988A565ABDF5@G01JPEXMBKW04
Whole thread Raw
In response to Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Jan Michálek <godzilalalala@gmail.com>)
Responses Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
List pgsql-hackers
>>I like the idea taking advantage of linestyle utilities 
>>to implement rst and markdown format efficiently instead of newly developing pset format things.
>>But I'm thinking two comments below needs change to something about not focusing only linestyle. 
>>That's because they really take care of both '\pset linestyle and \pset format' and it may lead to misunderstanding
toreaders.
 
>> 
>>---
>>/* Line style control structures */
>>const printTextFormat pg_markdown =
>> 
>>/* get selected or default line style */
>>const printTextFormat *
>>get_line_style(const printTableOpt *opt)
>>---

>It is in command.c?
>I have it done that \pset format changes linestyle


>psql (9.6.2, server 9.6.1)
>Type "help" for help.

>jelen=# \pset linestyle ascii
>Line style is ascii.
>jelen=# \pset format rst
>Output format is rst.
>jelen=# \pset linestyle
>Line style is rst.
>jelen=# 
>Peter wrote that this is not right, but i don`t know how it should like, because most of this is done on linestyle,
formatis used only for switch from console.
 

Thank you for explanation!

That's about print.c, but my explanation was poor...
My point was a slight thing about comments in source code.
I've just wanted to say comments needs change to match actual code.
These comments says about line style but the corresponding codes are about both line style and format. 

But these points should be considered after how to implement the new formats are decided.
So please don't care.
(I've just thought implementing the new formats using linestyle code came into consensus.)

Regards, 
Ideriha Takeshi

pgsql-hackers by date:

Previous
From: Venkata B Nagothi
Date:
Subject: Re: [HACKERS] patch proposal
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] identity columns