| From: | Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com> |
|---|---|
| To: | Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE |
| Date: | 2026-10-04 22:03:41 |
| Message-ID: | CAG7L5+6tk0vGmB07mdNd6mdt1048CdeMO=jA1MOEi6M2xzqyJg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Haruna,
I tested the patch and confirmed that `GRANT CREATE` and `REVOKE CREATE`
now complete to `ON` as expected, including lowercase input.
I also found that `REVOKE GRANT OPTION FOR CREATE` should reach the same
privilege-completion rule, but the earlier `TailMatches("CREATE")` branch
still intercepts it and offers CREATE object types instead of `ON`.
Perhaps it would be a good idea to cover this form in the same patch. What
do you think?
Thanks,
Sho Ito
On Sun, Oct 4, 2026 at 5:57 PM Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp> wrote:
> Hi,
>
> While testing psql tab completion, I noticed that the generic CREATE
> completion rule is triggered after GRANT CREATE and REVOKE CREATE.
>
> This results in irrelevant CREATE object type suggestions being offered
> in those contexts.
>
> I created a patch to exclude GRANT CREATE and REVOKE CREATE from the
> generic CREATE completion rule.
>
> Regards,
>
> Haruna Miwa
>
> --
> Haruna Miwa
>
--
=======================================
*Sho Ito (Sean)*
E-mail: i(dot)sho(dot)0628(at)gmail(dot)com
LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/
<https://www.linkedin.com/in/sho-ito-0628/>*
GitHub: https://github.com/sean0628/
=======================================
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stefan Guha | 2026-10-04 23:02:17 | Re: Planning time quadratic in the IN-list length for "c = X AND (a, b) IN (...)" with BitmapOr |
| Previous Message | Joao Detomini | 2026-10-04 21:36:25 | Limiting WAL retained for archiving, like max_slot_wal_keep_size |