Bruce Momjian wrote:
>
> I now remember a new problem with this feature, irregardless of whether
> we use 'lc_messages' or 'lc_time'.
>
> The problem is having a function's output affected by a GUC variable.
> If you create an expression index using the function, and later query
> the index with a different GUC value, or you do inserts with different
> GUC values, the index will not work.
>
> I know we have had this problem in the past, but I can't remember if or
> how we addressed it.
Mark the function as volatile, which precludes from using it in a
functional index?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.