Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE
Date
Msg-id CAHGQGwHJ6+A=+EHm3b6ZnKe=8vNO34=Gh4nQnDB1W6dJWeyaNQ@mail.gmail.com
Whole thread
In response to Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE  (Sho Ito <i.sho.0628@gmail.com>)
Responses Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE
List pgsql-hackers
On Wed, Oct 7, 2026 at 12:24 PM Sho Ito <i.sho.0628@gmail.com> wrote:
>
> Hi Haruna,
>
> Thank you for updating the patch. I tested v2 and confirmed that all three forms now complete to `ON` as expected.
> Now it looks good to me.

Thanks for the patch! It looks good to me except for one minor comment.

The source comment in the middle of the conditions is a bit hard to read.
How about moving it above the conditions and explaining why these cases are
excluded? For example:

/* CREATE */
- /* complete with something you can create */
+ /*
+ * Complete with something you can create. If CREATE is a privilege
+ * name, leave it to the GRANT/REVOKE rules below.
+ */
  else if (TailMatches("CREATE") &&
-
- /*
- * exclude cases of GRANT/REVOKE CREATE and REVOKE GRANT OPTION FOR
- * CREATE
- */

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: REPACK (CONCURRENTLY) can't complete after ~105M concurrent updates/deletes
Next
From: Peter Smith
Date:
Subject: Re: Include schema-qualified names in publication error messages (generalised to all of LR).