Allow invisible PROMPT2 in psql.

Thomas Munro <tmunro@postgresql.org>

Commit: 7f338369ca624ca6c2e4f579623274c88d325bce
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2019-11-19T02:56:21Z
Releases: 13.0
Allow invisible PROMPT2 in psql.

Keep track of the visible width of PROMPT1, and provide %w as a way
for PROMPT2 to generate the same number of spaces.

Author: Thomas Munro, with ideas from others
Reviewed-by: Tom Lane (earlier version)
Discussion: https://postgr.es/m/CA%2BhUKG%2BzGd7RigjWbxwhzGW59gUpf76ydQECeGdEdodH6nd__A%40mail.gmail.com

Files

PathChange+/−
doc/src/sgml/ref/psql-ref.sgml modified +12 −0
src/bin/psql/prompt.c modified +52 −0

Documentation touched

Discussion