psql - pager support - using invisible chars for signalling end of report - Mailing list pgsql-hackers

From Pavel Stehule
Subject psql - pager support - using invisible chars for signalling end of report
Date
Msg-id CAFj8pRD_XtPnbd4kDR97Eekfp7iNE8HiAMXt_LNb9Ba2Jw1iHQ@mail.gmail.com
Whole thread Raw
Responses Re: psql - pager support - using invisible chars for signalling end of report
List 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

pgsql-hackers by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: Anybody want to check for Windows timezone updates?
Next
From: Tom Lane
Date:
Subject: Re: psql - pager support - using invisible chars for signalling end of report