Re: Index on array element

Поиск
Список
Период
Сортировка
От Randolf Richardson
Тема Re: Index on array element
Дата
Msg-id Xns943FD177CE26Drr8xca@200.46.204.72
обсуждение исходный текст
Ответ на Index on array element  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
[sNip]
> It's got nothing to do with arrays as such, but is purely a syntactic
> restriction: if the indexed item is anything but an unadorned column
> name or a function call, CREATE INDEX wants parentheses around it.
>
> This is because the CREATE INDEX syntax also allows for an "operator
> class" name in there.  Consider
>
> create index foodex on foo (bar ! ops);
>
> Is this supposed to mean indexing the expression "bar ! ops" (infix !
> operator) or indexing the expression "bar !" (postfix ! operator) using
> the operator class "ops"?  No way to tell, so we make you clarify your
> intent with parentheses.  You can say either
>
> create index foodex on foo ((bar ! ops));
> create index foodex on foo ((bar !) ops);
>
> depending which interpretation you want.

        Thanks.  Your explanation is very helpful.

--
Randolf Richardson - rr@8x.ca
Vancouver, British Columbia, Canada

Please do not eMail me directly when responding
to my postings in the newsgroups.

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

Предыдущее
От: Marco Colombo
Дата:
Сообщение: Re: disaster recovery
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Postgresql on file system EXT2 or EXT3