From: D. Duccini <duccini@backpack.com>
To: pgsql-sql@postgresql.org
Cc: Pgsql-novice <pgsql-novice@postgresql.org>
Subject: date_trunc'd timestamp index possible?
Date: Mon, 27 Sep 2004 19:14:09 -0500 (CDT)
Message-ID: <Pine.GSO.4.10.10409271910480.22691-100000@solarwind> (raw)
In-Reply-To: <web-1583353@davinci.ethosmedia.com>
I'm trying to create a index from a timestamp+tz field and want the index
to be date_trunc'd down to just the date
when i try to do a
create idxfoo on foo (date(footime));
i get a
ERROR: DefineIndex: index function must be marked IMMUTABLE
and it chokes on when i try to use the date_trunc() function as well
create idxfoo on foo (date_trunc('day',footime));
ERROR: parser: parse error at or near "'day'" at character 53
Any suggestions/workarounds (other than creating additional date-only
columns in the schema and indexing those???)
-d
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: duccini@backpack.com, pgsql-novice@postgresql.org
Subject: Re: date_trunc'd timestamp index possible?
In-Reply-To: <Pine.GSO.4.10.10409271910480.22691-100000@solarwind>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox