On 21 April 2011 11:58, Josh Berkus <josh@xxxxxxxxxxxx> wrote: >> timestamptz + interval is not immutable --- in fact, the particular >> example you give (ts + '1 day') is certainly dependent on timezone >> setting. > > Why not? Given that the time zone will be the same for both the > timestamptz and the interval, how would the result not be immutable? > "IMMUTABLE indicates that the function cannot modify the database and always returns the same result when given the same argument values" Emphasis on "always". If the result of the function, given the same argument values, can be different after a SET, then it doesn't qualify for immutability. At least, that's my understanding. Cheers, BJ -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance