Re: Why do indexes and sorts use the database collation?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why do indexes and sorts use the database collation?
Date: 2023-11-14 04:48:38
Message-ID: 87b3c6950f44aba032f6bbc92c66d1387ece2133.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2023-11-13 at 22:36 +0100, Tomas Vondra wrote:
> Perhaps we could allow the PK index to have a different collation, say
> by supporting something like this:
>
>   ALTER TABLE distributors ADD PRIMARY KEY (dist_id COLLATE "C");

An appealing idea! While at it, we could add an INCLUDE clause...

The risk here would be extending standard syntax in a way that might
possibly conflict with future changes to the standard.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2023-11-14 07:01:54 Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)
Previous Message Laurenz Albe 2023-11-14 04:40:14 Re: Fix output of zero privileges in psql