Re: parse error in create index

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: parse error in create index
Дата
Msg-id Pine.BSF.4.21.0102060853160.43759-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на parse error in create index  (Hubert Palme <palme@uni-wuppertal.de>)
Ответы Re: parse error in create index  (palme@uni-wuppertal.de (Hubert Palme))
Список pgsql-sql
Functional indexes cannot currently take constant values to the function,
so it's complaining about the constant 'month'.  The current workaround is
probably to create a function that does the date_part('month', <arg>) for
you and then use that function in the index creation.

On Sat, 3 Feb 2001, Hubert Palme wrote:

> Hi,
> 
> could someone, please, explain me the following parse error?
> 
> adressen=> \d geburtstage
> Table    = geburtstage
> +----------------------------------+----------------------------------+-------+
> |              Field               |              Type                |
> Length|
> +----------------------------------+----------------------------------+-------+
> | lfd_nr                           | int4                            
> |     4 |
> | geburtstag                       | date                            
> |     4 |
> +----------------------------------+----------------------------------+-------+
> adressen=> create index Monat_Tag on geburtstage (date_part('month',
> Geburtstag));
> ERROR:  parser: parse error at or near "'"
> adressen=>
> 
> Thanks in advance,
> 
> -- 
> Hubert Palme
> palme@uni-wuppertal.de
> 



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

Предыдущее
От: Michael Ansley
Дата:
Сообщение: RE: PL/PGSQL function with parameters
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: PL/PGSQL function with parameters