Re: Column-Level Privileges - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Column-Level Privileges
Date
Msg-id 20090123001744.GH32428@tamriel.snowman.net
Whole thread Raw
In response to Re: Column-Level Privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Column-Level Privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> BTW, something else I'd meant to bring up for discussion is whether
> anyone likes the formatting of column privileges in \dp:

Well, I kinda like it, but that's not an entirely unbiased opinion. ;)

>                               Access privileges
>  Schema | Name | Type  |     Access privileges     | Column access privileges
> --------+------+-------+---------------------------+--------------------------
>  public | foo  | table | postgres=arwdDxt/postgres | bar:
>                        : joe=r/postgres            :   joe=a/postgres
>                                                    : baz:
>                                                    :   joe=w/postgres
> (1 row)
>
> (The colons after the column names are something I added on my own
> authority to Stephen's original.)

sure, makes sense.

> This seems a bit ASCII-art-ish to me; it certainly wouldn't be readily
> parsable by programs.  Now that's not really the design goal for \d
> output, and I don't have a better suggestion offhand, but still...
> anyone got a better idea?

One thing that just occured to me is that we could, should we want to,
move the column-level privs over into the 'Access privileges' column by
just adding them on after the table-level privs.  We would want to make
sure the table-level privs come first and maybe have some seperator to
indicate that the following are column-level privs.

That might make the display nicer on 80-col systems, though personally
I like larger windows. :)

A couple of things I didn't particularly like:
I don't like having to have a separate command to show column-level
privs, and I don't really like displaying the column-level privs after
the regular \dp output for tables.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum, reloptions, and hardcoded pg_class tupdesc
Next
From: Tom Lane
Date:
Subject: Re: Column-Level Privileges