Re: adding tab completions
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>, Edmund Horner <ejrh00@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-06-03T23:18:59Z
Lists: pgsql-hackers
Attachments
- v6-tab-complete-partitions (text/plain)
I finally got back to this; thanks everyone for reviews; I also added completion for parenthesized explain (...) d4382c4ae7ea1e272f4fee388aac8ff99421471a and for ALTER TABLE SET (toast_tuple_target). c2513365a0a85e77d3c21adb92fe12cfbe0d1897 BTW..should that be toast.tuple_target ?? Note that this also tries to comply with 921059bd66c7fb1230c705d3b1a65940800c4cbb This is okay in v10 but rejected in v11b1: postgres=# VACUUM ANALYZE VERBOSE t; ERROR: syntax error at or near "VERBOSE" On Tue, May 29, 2018 at 10:12:27AM -0400, Alvaro Herrera wrote: > Is it just me that finds shocking the notion of vacuuming a foreign > table? Fixed, thanks. On Tue, May 29, 2018 at 12:27:27PM +0300, Arthur Zakirov wrote: > The patch replaces the variable Query_for_list_of_tmf by > Query_for_list_of_tpmf. So I think Query_for_list_of_tmf isn't needed > anymore and can be removed. Fixed by adding relkind='p' to the existing list rather than making a new query entry. > Also I think it could be good to list column names after parentheses, > but I'm not sure if it easy to implement. I tried this and nearly gave up, but see attached. The complication is that table names for which to pull the attributes isn't at a constant offset; for example: vacuum analyze a(TAB => needs prev2_wd but vacuum analyze a(c, TAB => needs prev3_wd Maybe that's too much effort to include in tab completion. If so, the "prev_parens" stanza can be removed from VACUUM and ANALYZE. If it's desired to keep it, I guess I should avoid the duplicated lines. On Wed, May 30, 2018 at 12:45:30AM +1200, Edmund Horner wrote: > I don't believe it's meaningful to match on words with spaces in them, Excellent point...fixed. Find attached v6 (there were some "unpublished" versions). Justin
Commits
-
Improve tab completion for ANALYZE, EXPLAIN, and VACUUM.
- 121213d9d852 12.0 landed
-
Minor fixes for psql tab completion.
- 12368f5e83e7 11.0 landed
- 7046d3024605 12.0 landed
-
Add parenthesized options syntax for ANALYZE.
- 854dd8cff523 11.0 cited
-
Don't allow VACUUM VERBOSE ANALYZE VERBOSE.
- 921059bd66c7 11.0 cited
-
Parameter toast_tuple_target controls TOAST for new rows
- c2513365a0a8 11.0 cited
-
Add hash partitioning.
- 1aba8e651ac3 11.0 cited
-
Allow multiple tables to be specified in one VACUUM or ANALYZE command.
- 11d8d72c27a6 11.0 cited
-
Don't uselessly rewrite, truncate, VACUUM, or ANALYZE partitioned tables.
- 3c3bb99330aa 10.0 cited
-
Remove deprecated COMMENT ON RULE syntax
- e8d016d81940 10.0 cited
-
Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies.
- ede62e56fbe8 9.6.0 cited
-
Extend EXPLAIN to allow generic options to be specified.
- d4382c4ae7ea 9.0.0 cited