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

EXTRACT Clarification

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: EXTRACT Clarification
Date: 2004-09-29 12:35:32
Message-ID: 0E177963-1214-11D9-8537-000D93AE0944@sitening.com (view raw or flat)
Thread:
Lists: pgsql-docspgsql-general
Switching this thread to DOCS and renaming it...

Anyway, I think that this situation calls for some clarification in the 
docs. If others agree, I'd be happy to submit a potential patch.

I'm thinking something like this (with thanks to Stephan):

Note: EXTRACT is not a true function. SQL defines it as an expression 
that happens to look similar to a function call.

Is this wording acceptable? I'd imagine putting it at the end of 9.8.1.

Also, are there other expressions that fall into this category? I don't 
know the spec well enough to know.

-tfo

On Sep 29, 2004, at 1:30 AM, Stephan Szabo wrote:

> 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: Kris JurkaDate: 2004-09-29 13:21:49
Subject: Add tablespace index entry
Previous:From: Stephan SzaboDate: 2004-09-29 05:30:55
Subject: Re: Indexes on Expressions -- Parentheses

pgsql-general by date

Next:From: Kris JurkaDate: 2004-09-29 13:25:59
Subject: Re: EXTRACT Clarification
Previous:From: Najib Abi FadelDate: 2004-09-29 12:29:25
Subject: Re: Multiple Rules :: Postgres Is confused !!

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