Re: Struggling with EXCLUDE USING gist

From: Laura Smith <n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: postgre <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Struggling with EXCLUDE USING gist
Date: 2021-06-04 18:55:31
Message-ID: CVf1VeIE_ZXsMaqL_JK89eOSEZJ21pDZCbQK77ptxEUHsUochHrE47VKoXkWEPEKKxhW-85NP_282f4Q-lir2TNV09diUQYuTBFNSUnVsyE=@protonmail.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 4 June 2021 18:45, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> wrote:

> > On Jun 4, 2021, at 9:47 AM, Laura Smith n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch wrote:
> > CREATE TABLE test (
> > t_val text not null,
> > t_version text unique not null default gen_random_uuid() ,
> > t_range tstzrange not null default tstzrange('-infinity','infinity'),
> > EXCLUDE USING gist (t_val WITH=, t_range WITH &&) DEFERRABLE INITIALLY DEFERRED
> > );
>
> <snip>
>
> > INSERT INTO test(t_val) values(p_val);
>
> This will insert a t_range of ('-infinity','infinity'), won't it? Wouldn't you want to instead insert with t_range starting around now() rather than starting at -infinity?
>
> —
> Mark Dilger
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company

That seems to have done the trick. Thanks again Mark,

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Dilger 2021-06-04 18:56:21 Re: Struggling with EXCLUDE USING gist
Previous Message Laura Smith 2021-06-04 18:31:42 Re: Struggling with EXCLUDE USING gist