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
>