Re: Security definer "generated column" function used in index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Security definer "generated column" function used in index
Date
Msg-id 17366.1324417999@sss.pgh.pa.us
Whole thread Raw
In response to Re: Security definer "generated column" function used in index  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Security definer "generated column" function used in index  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> ... It wasn't even clear to me that it was
> OK to have one security definer function call another, based on the
> code comment I quoted, so I didn't want to spend more hours on
> attempting to create a test case if it simply wasn't supported.

Yes, that's definitely *supposed* to work, though I'll grant that there
could be bugs there.  It's hard to see how it'd be a race condition
though.

On reflection what seems most likely is simply that turning these
otherwise-inlineable SQL functions into SECURITY DEFINER disabled
inline-ing them, resulting in catastrophic degradation of the generated
plans, such that they took a lot longer than you were accustomed to
(they shouldn't have been "hung" though).

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Security definer "generated column" function used in index
Next
From: "Kevin Grittner"
Date:
Subject: Re: Security definer "generated column" function used in index