Search Postgresql Archives

Re: using gist index with dual-temporal timestamp values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anssi Kääriäinen <anssi.kaariainen@xxxxxx> 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°

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux