Re: trivial grammar refactor

2025-07-25 Thread Álvaro Herrera
On 2025-Jul-24, Nathan Bossart wrote: > On Thu, Jul 24, 2025 at 11:54:10AM +0200, Álvaro Herrera wrote: > > Yeah, thanks for taking a look. That duplication is just me being dumb. > > Here's a version without that. The only thing that needed to change was > > changing "CLUSTER opt_verbose" to "C

Re: trivial grammar refactor

2025-07-24 Thread Nathan Bossart
On Thu, Jul 24, 2025 at 11:54:10AM +0200, Álvaro Herrera wrote: > Yeah, thanks for taking a look. That duplication is just me being dumb. > Here's a version without that. The only thing that needed to change was > changing "CLUSTER opt_verbose" to "CLUSTER VERBOSE" so that the > unadorned CLUSTER

Re: trivial grammar refactor

2025-07-24 Thread Álvaro Herrera
Hello, On 2025-Jul-23, Andres Freund wrote: > On 2025-07-23 19:59:52 +0200, Álvaro Herrera wrote: > > ... so using the same set of productions, I can rewrite the current > > CLUSTER rule in this way and it won't be a problem for the REPACK > > changes. > > But it comes at the price of henceforth

Re: trivial grammar refactor

2025-07-23 Thread Andres Freund
Hi, On 2025-07-23 19:59:52 +0200, Álvaro Herrera wrote: > ... so using the same set of productions, I can rewrite the current > CLUSTER rule in this way and it won't be a problem for the REPACK > changes. But it comes at the price of henceforth duplicating all ClusterStmt, once for VERBOSE and on

Re: trivial grammar refactor

2025-07-23 Thread Álvaro Herrera
... so using the same set of productions, I can rewrite the current CLUSTER rule in this way and it won't be a problem for the REPACK changes. Thanks for looking! -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ >From 91edb076325ca366762832fcf3a4eab7de21002d Mon

Re: trivial grammar refactor

2025-07-23 Thread Álvaro Herrera
On 2025-Jul-23, Álvaro Herrera wrote: > So we can still do this, and I still think it's a win, but unfortunately > it won't help for the REPACK patch. Ah no, I can still use it: RepackStmt: REPACK opt_utility_option_list qualified_name USING INDEX name | REPACK opt_utilit

Re: trivial grammar refactor

2025-07-23 Thread Nathan Bossart
On Wed, Jul 23, 2025 at 06:50:59PM +0200, Álvaro Herrera wrote: > So we can still do this, and I still think it's a win, +1 > but unfortunately it won't help for the REPACK patch. Darn. -- nathan

Re: trivial grammar refactor

2025-07-23 Thread Álvaro Herrera
On 2025-Jul-23, Nathan Bossart wrote: > On Wed, Jul 23, 2025 at 05:38:34PM +0200, Álvaro Herrera wrote: > > I noticed some duplicative coding while hacking on REPACK[1]. We can > > save a few lines now with a trivial change to the rules for CHECKPOINT > > and REINDEX, and allow to save a few extr

Re: trivial grammar refactor

2025-07-23 Thread Nathan Bossart
On Wed, Jul 23, 2025 at 05:38:34PM +0200, Álvaro Herrera wrote: > I noticed some duplicative coding while hacking on REPACK[1]. We can > save a few lines now with a trivial change to the rules for CHECKPOINT > and REINDEX, and allow to save a few extra lines in that patch. > > Any objections to t

trivial grammar refactor

2025-07-23 Thread Álvaro Herrera
Hello I noticed some duplicative coding while hacking on REPACK[1]. We can save a few lines now with a trivial change to the rules for CHECKPOINT and REINDEX, and allow to save a few extra lines in that patch. Any objections to this? [1] https://commitfest.postgresql.org/patch/5117/ -- Álvaro