Re: [PATCH] psql: avoid CREATE command completion after GRANT/REVOKE CREATE

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com>
Cc: Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp>, "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-07 07:43:46
Message-ID: CAHGQGwHJ6+A=+EHm3b6ZnKe=8vNO34=Gh4nQnDB1W6dJWeyaNQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 7, 2026 at 12:24 PM Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

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