pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedpsql: tab completion for \l
4+ messages / 3 participants
[nested] [flat]
* psql: tab completion for \l
@ 2016-04-30 02:06 Ian Barwick <ian@2ndquadrant.com>
2016-08-17 05:41 ` Re: psql: tab completion for \l Gerdan Santos <gerdan@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Ian Barwick @ 2016-04-30 02:06 UTC (permalink / raw)
To: pgsql-hackers
Hi
Evidently over the past 15 or so years I've never needed to type "\l <TAB>",
but when isolating a single database entry in a cluster with a lot more
databases than most I've encountered, was suprised to notice it didn't work.
Trivial patch attached, will add to next commitfest.
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Attachments:
psql-tab-complete-backslash-l.patch (text/plain, 682B) download
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
new file mode 100644
index a62ffe6..a87b483
*** a/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
*************** psql_completion(const char *text, int st
*** 2994,2999 ****
--- 2994,3001 ----
COMPLETE_WITH_QUERY(Query_for_list_of_encodings);
else if (TailMatchesCS1("\\h") || TailMatchesCS1("\\help"))
COMPLETE_WITH_LIST(sql_commands);
+ else if (TailMatchesCS1("\\l*") && !TailMatchesCS1("\\lo_*"))
+ COMPLETE_WITH_QUERY(Query_for_list_of_databases);
else if (TailMatchesCS1("\\password"))
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
else if (TailMatchesCS1("\\pset"))
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql: tab completion for \l
2016-04-30 02:06 psql: tab completion for \l Ian Barwick <ian@2ndquadrant.com>
@ 2016-08-17 05:41 ` Gerdan Santos <gerdan@gmail.com>
2016-08-17 23:24 ` Re: psql: tab completion for \l Ian Barwick <ian@2ndquadrant.com>
2016-08-18 15:30 ` Re: psql: tab completion for \l Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: Gerdan Santos @ 2016-08-17 05:41 UTC (permalink / raw)
To: pgsql-hackers; +Cc: Ian Barwick <barwick@gmail.com>
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: tested, passed
I did some tests and found nothing special. The stated resource is implemented correctly.
He passes all regression tests and enables the use of the new features specified.
The new status of this patch is: Ready for Committer
--
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] 4+ messages in thread
* Re: psql: tab completion for \l
2016-04-30 02:06 psql: tab completion for \l Ian Barwick <ian@2ndquadrant.com>
2016-08-17 05:41 ` Re: psql: tab completion for \l Gerdan Santos <gerdan@gmail.com>
@ 2016-08-17 23:24 ` Ian Barwick <ian@2ndquadrant.com>
1 sibling, 0 replies; 4+ messages in thread
From: Ian Barwick @ 2016-08-17 23:24 UTC (permalink / raw)
To: Gerdan Santos <gerdan@gmail.com>; pgsql-hackers
Hi
On 8/17/16 2:41 PM, Gerdan Santos wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: tested, passed
> Documentation: tested, passed
>
> I did some tests and found nothing special. The stated resource is implemented correctly.
> He passes all regression tests and enables the use of the new features specified.
>
> The new status of this patch is: Ready for Committer
Thanks for taking the time to review this!
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services
--
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] 4+ messages in thread
* Re: psql: tab completion for \l
2016-04-30 02:06 psql: tab completion for \l Ian Barwick <ian@2ndquadrant.com>
2016-08-17 05:41 ` Re: psql: tab completion for \l Gerdan Santos <gerdan@gmail.com>
@ 2016-08-18 15:30 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2016-08-18 15:30 UTC (permalink / raw)
To: Gerdan Santos <gerdan@gmail.com>; +Cc: pgsql-hackers@postgresql.org, Ian Barwick <barwick@gmail.com>
Gerdan Santos <gerdan@gmail.com> writes:
> I did some tests and found nothing special. The stated resource is implemented correctly.
> He passes all regression tests and enables the use of the new features specified.
> The new status of this patch is: Ready for Committer
Pushed, thanks.
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] 4+ messages in thread
end of thread, other threads:[~2016-08-18 15:30 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-30 02:06 psql: tab completion for \l Ian Barwick <ian@2ndquadrant.com>
2016-08-17 05:41 ` Gerdan Santos <gerdan@gmail.com>
2016-08-17 23:24 ` Ian Barwick <ian@2ndquadrant.com>
2016-08-18 15:30 ` Tom Lane <tgl@sss.pgh.pa.us>
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