Skip site navigation (1) Skip section navigation (2)

Re: Indexes on Expressions -- Parentheses

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: "Thomas F(dot)O'Connell" <tfo(at)sitening(dot)com>
Cc: General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Indexes on Expressions -- Parentheses
Date: 2004-09-29 05:30:55
Message-ID: 20040928222637.L43334@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-docspgsql-general
sszabo(at)bigpanda(dot)com

On Tue, 28 Sep 2004, Thomas F.O'Connell wrote:

>  From 11.5 in the docs:
>
> "The syntax of the CREATE INDEX command normally requires writing
> parentheses around index expressions, as shown in the second example.
> The parentheses may be omitted when the expression is just a function
> call, as in the first example."
>
> But when I try this:
>
> db=# CREATE INDEX expression_idx on some_table( extract( year from
> some_column ) );

Extract(year from some_column) is not really just a function call it's
an expression that looks similar to a function call because that's how SQL
defined it.


In response to

Responses

pgsql-docs by date

Next:From: Thomas F.O'ConnellDate: 2004-09-29 12:35:32
Subject: EXTRACT Clarification
Previous:From: Thomas F.O'ConnellDate: 2004-09-29 03:44:28
Subject: Indexes on Expressions -- Parentheses

pgsql-general by date

Next:From: Neil ConwayDate: 2004-09-29 06:00:31
Subject: Re: To OID or not to OID
Previous:From: Andre MaasikasDate: 2004-09-29 05:15:07
Subject: Re: Controlling order of evaluation?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group