psql - pager support - using invisible chars for signalling end of report

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: psql - pager support - using invisible chars for signalling end of report
Date: 2020-04-24 17:54:48
Message-ID: CAFj8pRD_XtPnbd4kDR97Eekfp7iNE8HiAMXt_LNb9Ba2Jw1iHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

Last release of pspg supports stream mode - it means so you can open psql
in one terminal, redirect output to named pipe. In second terminal you can
start pspg and read input from named pipe. Then you can see and edit SQL in
one terminal, and you can see a result in second terminal.

It is working very well, but it is not too robust how I would. I miss a
some message in communication that can ensure synchronization - some
special char that can be used as separator between two results. Now, it is
based on detection and evaluation positions of empty rows.

I had a idea using some invisible chars, that are usually ignored (and use
these special characters only when user would it).

There are possible characters:

03 ETX .. end of text
28 FS .. file separator
29 GS .. group separator

What do you think about this?

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-04-24 19:33:35 Re: psql - pager support - using invisible chars for signalling end of report
Previous Message Juan José Santamaría Flecha 2020-04-24 17:42:47 Re: Anybody want to check for Windows timezone updates?