From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
Cc: | Daniel Farina <daniel(at)heroku(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: pg_signal_backend() asymmetry |
Date: | 2012-09-26 20:54:43 |
Message-ID: | 20120926205443.GA27074@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'm marking this patch Ready for Committer. I suggest backpatching it to 9.2;
the patch corrects an oversight in 9.2 changes. There's more compatibility
value in backpatching than in retaining distinct behavior for 9.2 only.
On Thu, Jun 28, 2012 at 09:32:41AM -0700, Josh Kupershmidt wrote:
> ! if (!superuser())
> {
> /*
> ! * Since the user is not superuser, check for matching roles.
> */
> ! if (proc->roleId != GetUserId())
> ! return SIGNAL_BACKEND_NOPERMISSION;
> }
I would have collapsed the conditionals and deleted the obvious comment:
if (!(superuser() || proc->roleId == GetUserId()))
return SIGNAL_BACKEND_NOPERMISSION;
The committer can do that if desired; no need for another version.
Thanks,
nm
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2012-09-26 20:56:52 | Re: data to json enhancements |
Previous Message | Bruce Momjian | 2012-09-26 19:29:38 | Re: pg_reorg in core? |