Daniel Schreiber <daniel(dot)schreiber(at)s1999(dot)tu-chemnitz(dot)de> writes:
> Okay, thanks for the help. I will rewrite the function as STABLE. Btw: is
> there documentation which parts in the environment are STABLE/IMMUTABLE?
Look in pg_proc (the provolatile column is 'i', 's', or 'v' IIRC).
I don't think psql's \df will show this column, which might be a mistake.
regards, tom lane