Unclear documentation (IMMUTABLE functions)

From: Daniel Schreiber <daniel(dot)schreiber(at)s1999(dot)tu-chemnitz(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Unclear documentation (IMMUTABLE functions)
Date: 2003-09-05 03:28:56
Message-ID: 200309050528.56266.daniel.schreiber@s1999.tu-chemnitz.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

A question on IMMUTABLE functions: do they only have to return the same value
during a session/connection or during the databse server's lifetime? The
documentation does not say anything about that.

I wrote a function that uses the CURRENT_USER session variable, and for my
current usage it is very important, that it returns a different value for
each database connection.
The current implementation is session, but it is quite important that this
behaviour will be the same in future releases. If it must be the same during
server lifetime, I had to rewrite the function to have the CURRENT_USER
variable passed as parameter (that would not be a big issue, of course).

Thanks for your attention,

Daniel Schreiber
--
Daniel Schreiber | ICQ: 220903493
GPG encrypted Mail welcome! Key ID: 25A6B489
Chemnitzer Linux-Tag:
http://www.tu-chemnitz.de/linux/tag/

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ben Grimm 2003-09-05 03:31:50 Re: pg_dump/all doesn't output schemas correctly (v7.3.4)
Previous Message Bruce Momjian 2003-09-04 23:24:15 Re: 7.4beta1, Error in dumpall from 7.3.4 since CASCADE could