public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fabian Lindfors <[email protected]>
To: [email protected]
Subject: Custom index access method for primary keys
Date: Sat, 5 Apr 2025 12:34:24 +0200
Message-ID: <[email protected]> (raw)

Hi! I’m working on an index access method that I intend to be generic and to replace btree for my specific use case. I noticed though that it doesn’t seem to be possible to specify an access method when creating a new table and using PRIMARY KEY.

Same applies to altering a table to add a primary key using an existing index with a non-btree access method. That hits this check and errors: https://github.com/postgres/postgres/blob/4be6a74cfb1ef4c50740e4c2f97a3b478c16de73/src/backend/parse...

Wanted to ask if this an intentional limitation and if there is a reason why an index access method (if it supports uniqueness) would not be usable for a primary key?

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Custom index access method for primary keys
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox