Indexes on Expressions -- Parentheses

Поиск
Список
Период
Сортировка
От Thomas F.O'Connell
Тема Indexes on Expressions -- Parentheses
Дата
Msg-id DD3C2AD6-11C9-11D9-8537-000D93AE0944@sitening.com
обсуждение исходный текст
Ответы Re: Indexes on Expressions -- Parentheses  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
From 11.5 in the docs:


<bigger><bigger>"The syntax of the
</bigger></bigger><fontfamily><param>Courier</param><x-tad-bigger>CREATE
INDEX</x-tad-bigger></fontfamily><bigger><bigger> 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."


</bigger></bigger>But when I try this:


db=# CREATE INDEX expression_idx on some_table( extract( year from
some_column ) );


I get a syntax error corresponding to the open parenthesis after
extract (and whitespace is not the issue).


If I add an enclosing set of parentheses, E.g.:


db=# CREATE INDEX expression_idx on some_table( ( extract( year from
some_column ) ) );


it works!


Is this a known issue?


-tfo
 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 ) );

I get a syntax error corresponding to the open parenthesis after
extract (and whitespace is not the issue).

If I add an enclosing set of parentheses, E.g.:

db=# CREATE INDEX expression_idx on some_table( ( extract( year from
some_column ) ) );

it works!

Is this a known issue?

-tfo

В списке pgsql-general по дате отправления:

Предыдущее
От: Russell Smith
Дата:
Сообщение: Re: Controlling order of evaluation?
Следующее
От: Andre Maasikas
Дата:
Сообщение: Re: Controlling order of evaluation?