Re: My first patch! (to \df output)

From: Jon Erdman <postgresql(at)thewickedtribe(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: My first patch! (to \df output)
Date: 2012-11-09 19:53:20
Message-ID: 1ACC4C7F-03A7-422A-82E2-E323DF8A5D3A@thewickedtribe.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 27, 2012, at 10:45 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:

> Hello
>
> 2012/10/27 Jon Erdman <postgresql(at)thewickedtribe(dot)net>:
>>
>> Hello Hackers!
>>
>> So, currently the only way to see if a function is security definer or not is to directly query pg_proc. This is both irritating, and I think perhaps dangerous since security definer functions can be so powerful. I thought that rectifying that would make an excellent first patch, and I was bored today here in Prague since pgconf.eu is now over...so here it is. :)
>>
>> This patch adds a column to the output of \df titled "Security" with values of "definer" or "invoker" based on the boolean secdef column from pg_proc. I've also included a small doc patch to match. This patch is against master from git. Comments welcome!
>>
>> I just realized I didn't address regression tests, so I guess this is not actually complete yet. I should have time for that next week after I get back to the states.
>>
>> I would also like to start discussion about perhaps adding a couple more things to \df+, specifically function execution permissions (which are also exposed nowhere outside the catalog to my knowledge), and maybe search_path since that's related to secdef. Thoughts?
>
> I prefer show this in \dt+ for column "Security" - and for other
> functionality maybe new statement.

I'm assuming you meant "\df+", and I've changed it accordingly. With this change there is now nothing to change in the regression tests, so please consider this my formal and complete submission.

Attachment Content-Type Size
describe.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Erdman 2012-11-09 20:22:06 Re: My first patch! (to \df output)
Previous Message Markus Wanner 2012-11-09 19:48:12 Re: Enabling Checksums