Re: New patch for Column-level privileges

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Markus Wanner <markus(at)bluegap(dot)ch>, Alex Hunsaker <badalex(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New patch for Column-level privileges
Date: 2009-01-13 14:21:21
Message-ID: 20090113142121.GB4656@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

KaiGai,

* KaiGai Kohei (kaigai(at)ak(dot)jp(dot)nec(dot)com) wrote:
> The attached patch is proof of the concept.

Thanks!

> It can be applied on the latest CVS HEAD with colprivs_2009011001.diff.gz.
> - It unpatches unnecessary updates at parser/parse_expr.c, parser/parse_node.c
> and parser/parse_relation.c.
> - It adds markColumnForSelectPriv() to mark proper rte->cols_sel for
> the given Var node. It is invoked from scanRTEForColumn(), expandRelAttrs()
> and transformWholeRowRef().

Ok.

> - The markColumnForSelectPriv() uses walker function internally, because
> there is no guarantee all the entities within RangeTblEntry->joinaliasvars
> are Var type node. However, it is used to walks on a single Var node, not
> whole of Query tree, so I think its cost is small enough.

If any of them aren't Vars, then wouldn't it be a subselect or similar,
in which case the non-join pieces would be handled through
scanRTEForColumn, etc? What I'm getting at here is- Are you sure that
the walk down the non-Var's in joinaliasvars is necessary? Have you
tried testing without it?

Other comments- you dropped the comments I had regarding the offsetting
when using the bitmap, and it would really be helpful if you could add
these cases to the regression tests so that myself and others working on
this patch and the code involved make sure to not break the semantics
which are required.

Thnaks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-01-13 14:53:09 Re: Recovery Test Framework
Previous Message Gregory Stark 2009-01-13 14:20:47 Re: Open item: kerberos warning message