psql tab auto-complete for CREATE PUBLICATION

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: psql tab auto-complete for CREATE PUBLICATION
Date: 2021-07-09 07:36:04
Message-ID: CAHut+Ps-vkmnWAShWSRVCB3gx8aM=bFoDqWgBNTzofK0q1LpwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I found that the psql tab auto-complete was not working for some cases
of CREATE PUBLICATION [1].

CREATE PUBLICATION name
[ FOR TABLE [ ONLY ] table_name [ * ] [, ...]
| FOR ALL TABLES ]
[ WITH ( publication_parameter [= value] [, ... ] ) ]

~~~

For example, the following scenarios did not work as I was expecting:

"create publication mypub for all tables " TAB --> expected complete
with "WITH ("

"create publication mypub for all ta" TAB --> expected complete with "TABLES"

"create publication mypub for all tables w" TAB --> expected complete
with "WITH ("

"create publication mypub for table mytable " TAB --> expected
complete with "WITH ("

~~~

PSA a small patch which seems to improve at least for those
aforementioned cases.

Now results are:

"create publication mypub for all tables " TAB --> "create publication
mypub for all tables WITH ( "

"create publication mypub for all ta" TAB --> "create publication
mypub for all tables "

"create publication mypub for all tables w" TAB --> "create
publication mypub for all tables with ( "

"create publication mypub for table mytable " TAB --> "create
publication mypub for table mytable WITH ( "

------
[1] https://www.postgresql.org/docs/devel/sql-createpublication.html

Kind Regards,
Peter Smith
Fujitsu Australia

Attachment Content-Type Size
v1-0001-more-auto-complete-for-CREATE-PUBLICATION.patch application/octet-stream 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2021-07-09 07:47:47 Re: Teach pg_receivewal to use lz4 compression
Previous Message Masahiko Sawada 2021-07-09 07:16:55 Re: [PoC] Improve dead tuple storage for lazy vacuum