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