Re: using gist index with dual-temporal timestamp values - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: using gist index with dual-temporal timestamp values
Date
Msg-id 20100331153359.GA6918@tux
Whole thread Raw
In response to using gist index with dual-temporal timestamp values  (Anssi Kääriäinen <anssi.kaariainen@thl.fi>)
List pgsql-general
Anssi Kääriäinen <anssi.kaariainen@thl.fi> wrote:

>
> So, the question is: Is there any (relatively easy) way to use gist
> index with dual-temporal tables? I think this will be asked a lot
> when 9.0 with exclusion constraints is released. The feature seems
> really powerful, but unfortunately supporting data types seem to be
> missing, at least from 8.4.

Why do you don't use the PERIOD - Datatype?

test=# \d foo
                         Table "public.foo"
 Column |  Type   |                    Modifiers
--------+---------+-------------------------------------------------
 i      | integer | not null default nextval('foo_i_seq'::regclass)
 p      | period  |
Indexes:
    "foo_pkey" PRIMARY KEY, btree (i)
    "foo_p_exclusion" gist (p)
Exclusion constraints:
    "foo_p_exclusion" EXCLUDE USING gist (p WITH &&)

test=# select * from foo;
 i |                        p
---+--------------------------------------------------
 1 | [2010-01-01 00:00:00+01, 2010-02-01 00:00:00+01)
(1 row)


17:33 < akretschmer> ??period
17:33 < pg_docbot_adz> For information about 'period' see:
17:33 < pg_docbot_adz> http://wiki.postgresql.org/wiki/RangeTypes
17:33 < pg_docbot_adz> http://pgfoundry.org/projects/temporal
17:33 < pg_docbot_adz> http://github.com/davidfetter/PostgreSQL-Temporal


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

pgsql-general by date:

Previous
From: Anssi Kääriäinen
Date:
Subject: using gist index with dual-temporal timestamp values
Next
From: "Christophe Dore"
Date:
Subject: prevent connection using pgpass.conf