Обсуждение: Index on geometry and timestamp

Поиск
Список
Период
Сортировка

Index on geometry and timestamp

От
Werdin Jens
Дата:

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

Re: Index on geometry and timestamp

От
Pierre-Frédéric Caillaud
Дата:

    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.

>
> 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
>



Re: Index on geometry and timestamp

От
Werdin Jens
Дата:
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.

>
> 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
>


Re: Index on geometry and timestamp

От
Oleg Bartunov
Дата:
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