Re: Expression index with function based on current_user? - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Expression index with function based on current_user?
Date
Msg-id BAY20-F12DDA6D4AB4450ADD87E98F9000@phx.gbl
Whole thread Raw
In response to Expression index with function based on current_user?  (Fredrik Olsson <fredrik.olsson@treyst.se>)
List pgsql-hackers
>
>The function private.haveaccess()'s result depends on the currently logged 
>in user, is it still possible to create an expression index over that 
>function?
>
>// Fredrik Olsson
>

Hello,

All functions and operators used in an index definition must be "immutable", 
that is, their results must depend only on their arguments and never on any 
outside influence. ... And your function is vollatile => you can't to do 
expression index.

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/



pgsql-hackers by date:

Previous
From: Fredrik Olsson
Date:
Subject: Expression index with function based on current_user?
Next
From: Hannu Krosing
Date:
Subject: Re: Expression index with function based on current_user?