Index on geometry and timestamp

Started by Werdin Jensover 21 years ago4 messagesgeneral
Jump to latest
#1Werdin Jens
jens.werdin@siemens.com

Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?

Greetings
Jens

#2Pierre-Frédéric Caillaud
lists@boutiquenumerique.com
In reply to: Werdin Jens (#1)
Re: Index on geometry and timestamp

You could convert your timestamp into an integer (number of seconds since
the epoch).
Also, under certain conditions, you can cheat and use a sequence instead
of a timestamp.

Show quoted text

Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST
index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?

Greetings
Jens

#3Werdin Jens
jens.werdin@siemens.com
In reply to: Pierre-Frédéric Caillaud (#2)
Re: Index on geometry and timestamp

The Problem is, that I need the milliseconds and the information of the
Timezone.

-----Ursprüngliche Nachricht-----
Von: Pierre-Frédéric Caillaud [mailto:lists@boutiquenumerique.com]
Gesendet: Dienstag, 7. Dezember 2004 09:48
An: Werdin Jens; pgsql-general@postgresql.org
Betreff: Re: [GENERAL] Index on geometry and timestamp

You could convert your timestamp into an integer (number of seconds
since
the epoch).
Also, under certain conditions, you can cheat and use a sequence
instead
of a timestamp.

Show quoted text

Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST
index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?

Greetings
Jens

#4Oleg Bartunov
oleg@sai.msu.su
In reply to: Werdin Jens (#1)
Re: Index on geometry and timestamp

On Tue, 7 Dec 2004, Werdin Jens wrote:

Hi,
I need an index on a postgis-point and a timestamp.
I'm using an GiST index on the geometry. But the creation of an GiST index
on geometry and timestamp seems to be impossible, because GiST doesn't
support Timestamps.
Is there a possibility to solve my problem?

yes, use contrib/btree_gist

Greetings
Jens

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83