Re: BUG #8211: Syntax error when creating index on expression

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: BUG #8211: Syntax error when creating index on expression
Дата
Msg-id CAGrpgQ86K8k_aO+PNGjGj-SOnyuuK-yQ46Fk9u7g1mp+HKWa9Q@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #8211: Syntax error when creating index on expression  (acizov@gmail.com)
Ответы Re: BUG #8211: Syntax error when creating index on expression  (David Johnston <polobo@yahoo.com>)
Список pgsql-bugs
On Wed, Jun 5, 2013 at 8:24 AM, <acizov@gmail.com> wrote:
>
> Bug reference:      8211
> Logged by:          Andrey Cizov
> Email address:      acizov@gmail.com
> PostgreSQL version: 9.2.3
> Operating system:   Windows
> Description:
>
> CREATE INDEX heuristic ON foos (1 / (a + b))
>
> causes:
>
> ERROR:  syntax error at or near "1"
> LINE 1: CREATE INDEX heuristic ON foos (1 / (a + b))
>                                         ^
>
> ********** Error **********
>
> ERROR: syntax error at or near "1"
> SQL state: 42601
> Character: 33
>
> While:
>
> CREATE INDEX heuristic ON foos ((1 / (a + b)))
>
> Execution successful



Did you look at the docs?

http://www.postgresql.org/docs/current/static/sql-createindex.html

expression

An expression based on one or more columns of the table. The expression
usually must be written with surrounding parentheses, as shown in the
syntax. However, the parentheses can be omitted if the expression has the
form of a function call.

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

Предыдущее
От: acizov@gmail.com
Дата:
Сообщение: BUG #8211: Syntax error when creating index on expression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #8211: Syntax error when creating index on expression