Re: New patch for Column-level privileges - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: New patch for Column-level privileges
Date
Msg-id 20090113142121.GB4656@tamriel.snowman.net
Whole thread Raw
In response to Re: New patch for Column-level privileges  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Responses Re: New patch for Column-level privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
KaiGai,

* KaiGai Kohei (kaigai@ak.jp.nec.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

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Open item: kerberos warning message
Next
From: Tom Lane
Date:
Subject: Re: Recovery Test Framework