Re: Struggling with EXCLUDE USING gist - Mailing list pgsql-general

From Mark Dilger
Subject Re: Struggling with EXCLUDE USING gist
Date
Msg-id 3694F477-58DD-4B8E-85A2-4B7BA97636D6@enterprisedb.com
Whole thread Raw
In response to Struggling with EXCLUDE USING gist  (Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>)
Responses Re: Struggling with EXCLUDE USING gist
Re: Struggling with EXCLUDE USING gist
List pgsql-general

> On Jun 4, 2021, at 9:47 AM, Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.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
startingaround now() rather than starting at -infinity? 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-general by date:

Previous
From: Laura Smith
Date:
Subject: Re: Struggling with EXCLUDE USING gist
Next
From: Adrian Klaver
Date:
Subject: Re: Struggling with EXCLUDE USING gist