Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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 ""
 Column |  Type   |                    Modifiers
 i      | integer | not null default nextval('foo_i_seq'::regclass)
 p      | period  |
    "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>
17:33 < pg_docbot_adz>
17:33 < pg_docbot_adz>

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group