Re: Syntax problem with INDEX on expression

Поиск
Список
Период
Сортировка
От Mike Blackwell
Тема Re: Syntax problem with INDEX on expression
Дата
Msg-id CANPAkgtxWAoEaFtDWDR=SdVJ7FkBBdUFHGgmjWHkodqYTT-+-w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Syntax problem with INDEX on expression  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
So, one set to mark the parameter and one for the expression?  It's starting to look like Lisp. ^_^

Thanks!

__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com




On Fri, Apr 5, 2013 at 4:18 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
Mike Blackwell <mike.blackwell@rrd.com> wrote:

> sp_dev=# create index test_idx on test ((xpath('//rms:xsid/text()',udh,array[array['rms','http://www.example.com']]))[1]::text);
> ERROR:  syntax error at or near "["
> LINE 1: ...udh,array[array['rms','http://www.example.com']]))[1]::text)...
>                                                              ^
> It looks like it doesn't like the array subscript.  What might I be missing?

You're missing a set of parentheses around the entire expression.

create index test_idx on test (((xpath('//rms:xsid/text()',udh,array[array['rms','http://www.example.com']]))[1]::text));

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Syntax problem with INDEX on expression
Следующее
От: Gavan Schneider
Дата:
Сообщение: Re: BEFORE UPDATE trigger doesn't change column value