Re: ERROR: DefineIndex: index function must be marked iscachable - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: ERROR: DefineIndex: index function must be marked iscachable
Date
Msg-id 3F218374.9000204@klaster.net
Whole thread Raw
In response to ERROR: DefineIndex: index function must be marked iscachable  (Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>)
List pgsql-sql
Dnia 2003-07-25 21:09, Użytkownik Elielson Fontanezi napisał:
> Hi all!
>  
>     What can I do in this case?
>     I could not found anything about iscachable.
>  
> postgres$ cat in.sql
> create index bt_proposta_f01 on proposta
> using btree (func_cod_secretaria(nr_proponente));
> 
> postgres$ psql -d escola -f in.sql
> psql:in.sql:2: ERROR:  DefineIndex: index function must be marked iscachable
> postgres$
You should follow the error. Your function func_cod_secretaria has to be 
declared as cacheable. (Look into documentation - sql commands / create 
function). IMMUTABLE function should help.

This function has also for some nr_proponente returns always the same 
value (look at IMMUTABLE description)

Regards,
Tomasz Myrta



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: ERROR: DefineIndex: index function must be marked iscachable
Next
From: Stephan Szabo
Date:
Subject: Re: [GENERAL] ERROR: DefineIndex: index function must be