Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
| От | Laurenz Albe | 
|---|---|
| Тема | Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that | 
| Дата | |
| Msg-id | 11e73b0d2d89476fb04e6055a80638f776bb6f18.camel@cybertec.at обсуждение исходный текст  | 
		
| Ответ на | BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that (PG Bug reporting form <noreply@postgresql.org>) | 
| Ответы | 
                	
            		Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that
            		
            		 Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that  | 
		
| Список | pgsql-bugs | 
On Wed, 2025-10-29 at 09:54 +0000, PG Bug reporting form wrote:
> PostgreSQL version: 18.0
>
> Using unique constraint, at Postgres 18, I am able to use `WITHOUT OVERLAPS`
> using that, in fact I created index, that I can see at pg_indexes:
> `CREATE UNIQUE INDEX inventoryoffer_unique_index ON public.test_table USING
> gist (inventory_id, account_id, from_offer_id, for_account_id,
> _availability_range);`
> It says, that it is gist UNIQUE index.
> But if I would like to just create index like that (copy and paste that
> definition from pg_indexes)
> I am getting error:
> [0A000] ERROR: access method "gist" does not support unique indexes
> which sounds weird, in fact of `WITHOUT OVERLAPS` existence
I think I see what you mean:
  CREATE TABLE temp (
     id bigint NOT NULL,
     valid tstzrange NOT NULL,
     CONSTRAINT temp_pkey PRIMARY KEY (id, valid WITHOUT OVERLAPS)
  );
  SELECT pg_get_indexdef('temp_pkey'::regclass);
                             pg_get_indexdef
  ----------------------------------------------------------------------
   CREATE UNIQUE INDEX temp_pkey ON laurenz.temp USING gist (id, valid)
That CREATE INDEX statement won't work.
Yours,
Laurenz Albe
		
	В списке pgsql-bugs по дате отправления: