1. \p ignores the "previous buffer". Example:

Yeah, I did that intentionally, thinking that the old behavior was
confusing.  We can certainly discuss it though.  I'd tend to agree
with your point that \p and \w should print the same thing, but
maybe neither of them should look at the previous_buf.

After some testing:

ISTM that \p should print what \g would execute, otherwise there is no consistent way to look at what \g would do.

Currently \e allows to look at this (previous) executed buffer by editing it, but I would find it more consistent if \p is in sync with that, and \e also coldly executes the command on return if it ends with ";".

2. \r keeps the "previous buffer". I think it should clear it.

I don't really agree with this.  The fact that it used to clear both
buffers was an implementation accident that probably nobody had even
understood clearly.  ISTM that loses functionality because you can't
do \g anymore.

I agree on this one.


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to