From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rosser Schwarz <rosser.schwarz@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: indices and casts
Date: Mon, 11 Oct 2004 18:32:04 -0400
Message-ID: <24903.1097533924@sss.pgh.pa.us> (raw)
In-Reply-To: <37d451f704101115152fa2acc8@mail.gmail.com>
References: <37d451f704101115152fa2acc8@mail.gmail.com>
Rosser Schwarz <rosser.schwarz@gmail.com> writes:
> Is it possible to do something functionally equivalent to "CREATE
> INDEX name ON table USING btree(column::date)"? That statement yields
> a syntax error on the "::".
CREATE INDEX name ON table USING btree((column::date))
See the docs concerning indexes on expressions (formerly called
functional indexes). The parens are needed to avoid syntactic ambiguity
associated with the optional opclass name ...
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rosser.schwarz@gmail.com
Subject: Re: indices and casts
In-Reply-To: <24903.1097533924@sss.pgh.pa.us>
References: <37d451f704101115152fa2acc8@mail.gmail.com> <24903.1097533924@sss.pgh.pa.us>
* 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