Re: Other formats in pset like markdown, rst, mediawiki

From: "Ideriha, Takeshi" <ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com>
To: Jan Michálek <godzilalalala(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Other formats in pset like markdown, rst, mediawiki
Date: 2017-03-22 01:02:59
Message-ID: 4E72940DA2BF16479384A86D54D0988A565ABDF5@G01JPEXMBKW04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 to readers.
>>
>>---
>>/* 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, format is 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-22 01:04:33 Re: identity columns
Previous Message Venkata B Nagothi 2017-03-22 00:45:40 Re: patch proposal