pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: ERROR:  DefineIndex: index function must be marked iscachable
Date: Fri, 25 Jul 2003 21:22:28 +0200
Message-ID: <3F218374.9000204@klaster.net> (raw)
In-Reply-To: <A799F7647794D311924A005004ACEA9709699783@cprodamibs249.prodam>
References: <A799F7647794D311924A005004ACEA9709699783@cprodamibs249.prodam>

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




view thread (6+ messages)  latest in thread

Message-ID: <3F218374.9000204@klaster.net>
Permalink:  ../3F218374.9000204@klaster.net/
Also on:    postgresql.org/message-id/3F218374.9000204@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, ElielsonF@prodam.sp.gov.br
  Subject: Re: ERROR:  DefineIndex: index function must be marked iscachable
  In-Reply-To: <3F218374.9000204@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox