Re: New patch for Column-level privileges

Поиск
Список
Период
Сортировка
От KaiGai Kohei
Тема Re: New patch for Column-level privileges
Дата
Msg-id 49669651.3090102@ak.jp.nec.com
обсуждение исходный текст
Ответ на Re: New patch for Column-level privileges  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: New patch for Column-level privileges  (Stephen Frost <sfrost@snowman.net>)
Re: New patch for Column-level privileges  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Stephen Frost wrote:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> Stephen Frost <sfrost@snowman.net> writes:
>>> I'm open to suggestions about how to handle this.  My first thought
>>> would be- add an entry to the cols_sel list for the RTE that is special
>>> and indicates "any column", perhaps by using a '0' for the attrid, as is
>>> done elsewhere.  Then modify ExecCheckRTEPerms() to handle it.
>> Wouldn't it be sufficient to treat an empty cols_sel list that way?
> 
> I've thought about it some, and yes, that sounds reasonable.  I'll try
> and implement it tonight and test it out.

I also think it is a reasonable solution.

In addition, please note that the following case:

| postgres=# SELECT t1 FROM t1;
|    t1
| ---------
|  (1,aaa)
|  (2,bbb)
|  (3,ccc)

When we refer table-rowtype, analyzer handles its Var->varattno has
InvalidAttrNumber (=0). If SQL standard mention nothing, it is quite
natural to consider it refers whole of the user columns.

I think it can share the code to handle the above empty cols_sel cases.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Proposal: new border setting in psql
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Improving compressibility of WAL files