Hi all!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.
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$
This function has also for some nr_proponente returns always the same value (look at IMMUTABLE description)
Regards, Tomasz Myrta
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]