Re: Sequence Access Methods, round two

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Sequence Access Methods, round two
Date: 2025-08-18 23:28:07
Message-ID: aKO3B9_kIE9ROuOF@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 18, 2025 at 06:15:05PM +0500, Kirill Reshke wrote:
> Yes, this resonates with me better.

After sleeping on it, yes, perhaps that's the right move.
test_ddl_deparse reports the attributes as related to a sequence, but
it's really how this is handled internally anyway with the internal
call of DefineRelation(). This entirely decouples the relation
creation and the creation of its attributes.

> @@ -3365,7 +3365,7 @@ match_previous_words(int pattern_id,
> COMPLETE_WITH("TYPE");
> /* Complete "CREATE ACCESS METHOD <name> TYPE" */
> else if (Matches("CREATE", "ACCESS", "METHOD", MatchAny, "TYPE"))
> - COMPLETE_WITH("INDEX", "TABLE");
> + COMPLETE_WITH("INDEX", "TABLE", "SEQUENCE");
> /* Complete "CREATE ACCESS METHOD <name> TYPE <type>" */
> else if (Matches("CREATE", "ACCESS", "METHOD", MatchAny,
> "TYPE", MatchAny))
> COMPLETE_WITH("HANDLER");

Right, thanks.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-08-18 23:34:11 Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Previous Message Masahiko Sawada 2025-08-18 23:21:20 Re: Logical Replication of sequences