Re: Typo in doc or wrong EXCLUDE implementation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: KES <kes-kes(at)yandex(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Typo in doc or wrong EXCLUDE implementation
Date: 2018-08-08 13:51:28
Message-ID: 12107.1533736288@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Wed, Aug 8, 2018 at 01:55:53PM +0300, KES wrote:
>> If such exclusion constraint would be marked as UNIQUE we can use it for FK while implementing temporal/bi-temporal tables.

> Yes, it would work, but doing that only for equality would be surprising
> to many people because exclusion constraints are more general than
> equality comparisons.

In general, we should be discouraging people from using EXCLUDE syntax
with simple equality operators, not encouraging them to do so. It's
less efficient and less portable than a regular btree-based uniqueness
constraint. So I think this proposal is a bad idea regardless of
whether it'd be technically feasible or not.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Chris Travers 2018-08-08 14:53:42 Re: Release note trimming: another modest proposal
Previous Message Bruce Momjian 2018-08-08 13:00:40 Re: Typo in doc or wrong EXCLUDE implementation

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-08-08 13:58:38 Re: Facility for detecting insecure object naming
Previous Message Stephen Frost 2018-08-08 13:36:08 Re: Negotiating the SCRAM channel binding type