pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Make psql's \set display variables in alphabetical order.
6+ messages / 4 participants
[nested] [flat]
* pgsql: Make psql's \set display variables in alphabetical order.
@ 2017-02-01 16:25 Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2017-02-01 16:25 UTC (permalink / raw)
To: pgsql-committers
Make psql's \set display variables in alphabetical order.
"\set" with no arguments displays all defined variables, but it does so
in the order that they appear in variables.c's list, which previously
was mostly creation order. That makes the list ugly and hard to find
things in, and it exposes some psql implementation details to users.
(For instance, ordinary variables will move to the bottom of the list
if unset and set again, but variables that have hooks won't.)
Fix that by keeping the list in alphabetical order at all times, which
isn't much more complicated than breaking out of the insertion search
loops once we reach an entry that should be after the one to be inserted.
Discussion: https://postgr.es/m/31785.1485900786@sss.pgh.pa.us
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/c3e3844a92fe42109e4106314f7d229f784a7d0a
Modified Files
--------------
src/bin/psql/variables.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order.
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-02-01 17:18 ` David Fetter <david@fetter.org>
2017-02-01 17:59 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: David Fetter @ 2017-02-01 17:18 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
On Wed, Feb 01, 2017 at 04:25:25PM +0000, Tom Lane wrote:
> Make psql's \set display variables in alphabetical order.
This is a substantial usability improvement which nevertheless is hard
to imagine changes things that scripts relied on. I think it's worth
back-patching.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order.
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
@ 2017-02-01 17:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 18:08 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2017-02-01 17:59 UTC (permalink / raw)
To: David Fetter <david@fetter.org>; +Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
David Fetter <david@fetter.org> writes:
> On Wed, Feb 01, 2017 at 04:25:25PM +0000, Tom Lane wrote:
>> Make psql's \set display variables in alphabetical order.
> This is a substantial usability improvement which nevertheless is hard
> to imagine changes things that scripts relied on. I think it's worth
> back-patching.
I'm not that excited about it personally, but I agree it would be unlikely
to break anything. Other votes?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order.
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
2017-02-01 17:59 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-02-01 18:08 ` Andres Freund <andres@anarazel.de>
2017-02-01 21:38 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2017-02-01 18:08 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David Fetter <david@fetter.org>; PostgreSQL Development <pgsql-hackers@postgresql.org>
On 2017-02-01 12:59:36 -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Wed, Feb 01, 2017 at 04:25:25PM +0000, Tom Lane wrote:
> >> Make psql's \set display variables in alphabetical order.
>
> > This is a substantial usability improvement which nevertheless is hard
> > to imagine changes things that scripts relied on. I think it's worth
> > back-patching.
>
> I'm not that excited about it personally, but I agree it would be unlikely
> to break anything. Other votes?
-0.5 - I see very little reason to backpatch this over dozes of other
changes.
- Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order.
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
2017-02-01 17:59 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 18:08 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Andres Freund <andres@anarazel.de>
@ 2017-02-01 21:38 ` Robert Haas <robertmhaas@gmail.com>
2017-02-01 21:56 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Haas @ 2017-02-01 21:38 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; David Fetter <david@fetter.org>; PostgreSQL Development <pgsql-hackers@postgresql.org>
On Wed, Feb 1, 2017 at 1:08 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2017-02-01 12:59:36 -0500, Tom Lane wrote:
>> David Fetter <david@fetter.org> writes:
>> > On Wed, Feb 01, 2017 at 04:25:25PM +0000, Tom Lane wrote:
>> >> Make psql's \set display variables in alphabetical order.
>>
>> > This is a substantial usability improvement which nevertheless is hard
>> > to imagine changes things that scripts relied on. I think it's worth
>> > back-patching.
>>
>> I'm not that excited about it personally, but I agree it would be unlikely
>> to break anything. Other votes?
>
> -0.5 - I see very little reason to backpatch this over dozes of other
> changes.
I'll vote -1. I don't think this is a bug fix.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order.
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. David Fetter <david@fetter.org>
2017-02-01 17:59 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 18:08 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Andres Freund <andres@anarazel.de>
2017-02-01 21:38 ` Re: [COMMITTERS] pgsql: Make psql's \set display variables in alphabetical order. Robert Haas <robertmhaas@gmail.com>
@ 2017-02-01 21:56 ` David Fetter <david@fetter.org>
0 siblings, 0 replies; 6+ messages in thread
From: David Fetter @ 2017-02-01 21:56 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Andres Freund <andres@anarazel.de>; Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Development <pgsql-hackers@postgresql.org>
On Wed, Feb 01, 2017 at 04:38:59PM -0500, Robert Haas wrote:
> On Wed, Feb 1, 2017 at 1:08 PM, Andres Freund <andres@anarazel.de> wrote:
> > On 2017-02-01 12:59:36 -0500, Tom Lane wrote:
> >> David Fetter <david@fetter.org> writes:
> >> > On Wed, Feb 01, 2017 at 04:25:25PM +0000, Tom Lane wrote:
> >> >> Make psql's \set display variables in alphabetical order.
> >>
> >> > This is a substantial usability improvement which nevertheless is hard
> >> > to imagine changes things that scripts relied on. I think it's worth
> >> > back-patching.
> >>
> >> I'm not that excited about it personally, but I agree it would be unlikely
> >> to break anything. Other votes?
> >
> > -0.5 - I see very little reason to backpatch this over dozes of other
> > changes.
>
> I'll vote -1. I don't think this is a bug fix.
I withdraw my suggestion.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-02-01 21:56 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 16:25 pgsql: Make psql's \set display variables in alphabetical order. Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 17:18 ` David Fetter <david@fetter.org>
2017-02-01 17:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-02-01 18:08 ` Andres Freund <andres@anarazel.de>
2017-02-01 21:38 ` Robert Haas <robertmhaas@gmail.com>
2017-02-01 21:56 ` David Fetter <david@fetter.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox