Primary key gist index?

From: Jeremy Finzel <finzelj(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Primary key gist index?
Date: 2018-03-14 13:19:49
Message-ID: CAMa1XUiQDM2n5EHPir_ECoTjdA=kEDu1u_p=zMUxzdkkJpgmhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello! From all that I can tell, it is not possible using a btree_gist
index as a primary key. If so, why not? I have a table with this gist
index which truly ought to be its primary key. as_of_date is of range date
type:

EXCLUDE USING gist (id WITH =, as_of_date WITH &&)

Any direction here would be much appreciated.

Right now, I am forced to create a redundant btree index UNIQUE, btree (id,
lower(as_of_date)) in order to have a primary key on the table.

Thanks!
Jeremy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-03-14 13:33:34 Re: Primary key gist index?
Previous Message Adrian Klaver 2018-03-13 23:48:58 Re: JDBC connectivity issue