| From: | Chapman Flack <chap(at)anastigmatix(dot)net> |
|---|---|
| To: | David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Invisible PROMPT2 |
| Date: | 2019-11-13 18:03:08 |
| Message-ID: | bbe78f8f-4d33-fb53-0210-5f994d759387@anastigmatix.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 11/13/19 12:49 PM, David Fetter wrote:
>> Or just define %w as meaning "whitespace of the same width as
>> PROMPT1". You couldn't use it *in* PROMPT1, then, but I see
>> no use-case for that anyway.
>
> +1 for doing it this way. Would it make more sense to error out if
> somebody tried to set that in PROMPT1, or ignore it, or...?
Define it as "difference between PROMPT1's width and the total width
of non-%w elements in this prompt". Then it has a defined meaning in
PROMPT1 too (which could be arbitrary if it appears only once, but
has to be zero in case it appears more than once).
Easter egg: expand it to backspaces if used in PROMPT2 among other
stuff that's already wider than PROMPT1. ;)
Regards,
-Chap
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Dilger | 2019-11-13 18:04:36 | Re: Using multiple extended statistics for estimates |
| Previous Message | Andres Freund | 2019-11-13 18:02:00 | Re: [PATCH] Improve AtSubCommit_childXids |