"Gaetano Mendola" <mendola(at)bigfoot(dot)com> writes:
> I expected that if a function is cachable and is used
> inside a select like:
> SELECT * FROM foo WHERE id = my_func( a_param )
> then the function my_func is called one for each different value
> of a_param.
That is not what "cachable" means to Postgres. There is no function
result cache such as you seem to envision.
regards, tom lane