Re: Expression index with function based on current_user?

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: fredrik(dot)olsson(at)treyst(dot)se, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Expression index with function based on current_user?
Date: 2006-02-08 11:53:08
Message-ID: BAY20-F12DDA6D4AB4450ADD87E98F9000@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Bernier 2006-02-08 12:10:26 Re: Audio interview
Previous Message Fredrik Olsson 2006-02-08 11:26:24 Expression index with function based on current_user?