Re: indices and casts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: indices and casts
Date: 2004-10-11 22:32:04
Message-ID: 24903.1097533924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rosser Schwarz 2004-10-11 22:48:46 Re: indices and casts
Previous Message Rosser Schwarz 2004-10-11 22:15:41 indices and casts