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

From: Jan Michálek <godzilalalala(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Other formats in pset like markdown, rst, mediawiki
Date: 2017-02-28 23:27:20
Message-ID: CAAYBy8YH-FYZDJG+Cb8Yk2XTQHzyEv3F2crxM1BEkm8JyaePjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There it is, what i have.
I need i small help with psql.out, because \pset format wrapped. I don`t
know, how to have it in fixed width.

2017-02-28 14:23 GMT+01:00 Jan Michálek <godzilalalala(at)gmail(dot)com>:

> Current state is something like this (diff is attached).
> I currently haven`t regression test, tab completion etc., I will add this
> thing following structure of asciidoc commit.
>
> Output is tested using retext, rst is OK, md have problem with cells with
> newline (i must find out, how it is possible create table with this in
> markdown).
>
> [jelen(at)laptak patch_postgre_rst]$
> [jelen(at)laptak psql]$ ./psql
> psql (9.6.2, server 9.6.1)
> Type "help" for help.
>
> jelen=# \pset linestyle markdown
> Line style is markdown.
> jelen=# values(E'nasral Franta\nna trabanta','Žluťoučký kobyly'),
> ('''',E'a\tb') \g | xclip
> jelen=# values(E'nasral Franta\nna trabanta','Žluťoučký kobyly'),
> ('''',E'a\tb') \g
>
> | column1 | column2 |
> |---------------|------------------|
> | nasral Franta | Žluťoučký kobyly |
> | na trabanta | |
> | ' | a b |
>
>
> (2 rows)
>
> jelen=# \pset linestyle rst
> Line style is rst.
> jelen=# values(E'nasral Franta\nna trabanta','Žluťoučký kobyly'),
> ('''',E'a\tb') \g
> +---------------+------------------+
> | column1 | column2 |
> +===============+==================+
> | nasral Franta+| Žluťoučký kobyly |
> | na trabanta | |
> +---------------+------------------+
> | ' | a b |
> +---------------+------------------+
>
> (2 rows)
>
> jelen=#
>
> 2017-02-24 0:46 GMT+01:00 Michael Paquier <michael(dot)paquier(at)gmail(dot)com>:
>
>> On Fri, Feb 24, 2017 at 3:09 AM, Jan Michálek <godzilalalala(at)gmail(dot)com>
>> wrote:
>> > I can try it, doesn`t look dificult, but I`m worry, that I`m not able to
>> > write clean, pretty code.
>>
>> If you want to have something available in Postgres 10, you had better
>> be quick. The last commit fest of the development cycle of Postgres 10
>> begins on the 1st of March, you need to to register your patch here:
>> https://commitfest.postgresql.org/13/
>> Here are also some rough guidelines about submitting a patch:
>> https://wiki.postgresql.org/wiki/Submitting_a_Patch
>> --
>> Michael
>>
>
>
>
> --
> Jelen
> Starší čeledín datovýho chlíva
>

--
Jelen
Starší čeledín datovýho chlíva

Attachment Content-Type Size
patch_markdown_rst.diff text/plain 34.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2017-03-01 00:33:23 Re: PassDownLimitBound for ForeignScan/CustomScan [take-2]
Previous Message Andres Freund 2017-02-28 20:45:43 Re: Disallowing multiple queries per PQexec()