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