Re: using gist index with dual-temporal timestamp values

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: using gist index with dual-temporal timestamp values
Date: 2010-03-31 15:33:59
Message-ID: 20100331153359.GA6918@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)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°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2010-03-31 16:26:24 Re: prevent connection using pgpass.conf
Previous Message Christophe Dore 2010-03-31 15:32:56 prevent connection using pgpass.conf