Re: Review of GetUserId() Usage - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Review of GetUserId() Usage
Date
Msg-id CAB7nPqQBmSJtF_JDodT4KdzBKhmoXDRBMRkr+P4jeOkh8zZ4LA@mail.gmail.com
Whole thread Raw
In response to Re: Review of GetUserId() Usage  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Review of GetUserId() Usage  (Jeevan Chalke <jeevan.chalke@gmail.com>)
List pgsql-hackers
<div dir="ltr"><br /><div class="gmail_extra"><br /><div class="gmail_quote">On Fri, Dec 5, 2014 at 11:28 PM, Stephen
Frost<span dir="ltr"><<a href="mailto:sfrost@snowman.net" target="_blank">sfrost@snowman.net</a>></span>
wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div
class="HOEnZb"><divclass="h5">* Stephen Frost (<a href="mailto:sfrost@snowman.net">sfrost@snowman.net</a>) wrote:<br />
>* Stephen Frost (<a href="mailto:sfrost@snowman.net">sfrost@snowman.net</a>) wrote:<br /> > > > 3. It
messesaround with pg_signal_backend().  There are currently no<br /> > > > cases in which pg_signal_backend()
throwsan error, which is good,<br /> > > > because it lets you write queries against pg_stat_activity()
that<br/> > > > don't fail halfway through, even if you are missing permissions on<br /> > > > some
things. This patch introduces such a case, which is bad.<br /> > ><br /> > > Good point, I'll move that
checkup into the other functions, which will<br /> > > allow for a more descriptive error as well.<br /> ><br
/>> Err, I'm missing something here, as pg_signal_backend() is a misc.c<br /> > static internal function?  How
wouldyou be calling it from a query<br /> > against pg_stat_activity()?<br /> ><br /> > I'm fine making the
changeanyway, just curious..<br /><br /></div></div>Updated patch attached which move the ereport() out of<br />
pg_signal_backend()and into its callers, as the other permissions<br /> checks are done, and includes the documentation
changes. The error<br /> messages are minimally changed to match the new behvaior.<br /></blockquote></div><br
/></div><divclass="gmail_extra">Moving to next CF, this patch did not get reviews.<br />-- <br /><div
class="gmail_signature">Michael<br/></div></div></div> 

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Patch to support SEMI and ANTI join removal
Next
From: Amit Kapila
Date:
Subject: Re: assessing parallel-safety