ERROR: DefineIndex: index function must be marked iscachable

From: Elielson Fontanezi <ElielsonF(at)prodam(dot)sp(dot)gov(dot)br>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: ERROR: DefineIndex: index function must be marked iscachable
Date: 2003-07-25 19:43:34
Message-ID: A799F7647794D311924A005004ACEA9709699785@cprodamibs249.prodam
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Hi!

Who can help me on that?

First of all, my envoronment is:
Linux netlab142.prodam 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001
i686 unknown
pg_ctl (PostgreSQL) 7.2.

Problem: ERROR: DefineIndex: index function must be marked iscachable
by executing:

create index bt_proposta_f01 on proposta
using btree (func_cod_secretaria(nr_proponente));

Where nr_proponte is a integer type column.

The function is:

CREATE OR REPLACE FUNCTION func_cod_secretaria(INTEGER) RETURNS INTEGER AS '
DECLARE
v_nr_proponente ALIAS FOR $1;
BEGIN
return TRUNC(v_nr_proponente/100000,0)*100000
END;
' LANGUAGE 'plpgsql';

>\\\!/< 55 11 5080 9283
!_"""_! Elielson Fontanezi
(O) (o) PRODAM - Technical Support
Analyst
-------------------------------oOOO--(_)--OOOo------------------------------
-----
Success usually comes to those who are too busy to be looking for it.
oooo0 0oooo
---------------------------( )----------(
)--------------------------------
\ ( ) /
\_/ \_/


Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-07-25 19:47:24 Re: ERROR: DefineIndex: index function must be marked
Previous Message Tom Lane 2003-07-25 19:39:38 Re: Query analyse

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-07-25 19:47:24 Re: ERROR: DefineIndex: index function must be marked
Previous Message Tom Lane 2003-07-25 19:39:38 Re: Query analyse