Re: COPY command with RLS bug

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: COPY command with RLS bug
Дата
Msg-id CANP8+jL_q02yODTOzJuSudffsVMYhbR1Y3McWfPJCspf5WA1VA@mail.gmail.com
обсуждение исходный текст
Ответ на COPY command with RLS bug  (Adam Brightwell <adam.brightwell@crunchydata.com>)
Ответы Re: COPY command with RLS bug  (Adam Brightwell <adam.brightwell@crunchydata.com>)
Список pgsql-hackers
On 8 September 2016 at 20:13, Adam Brightwell
<adam.brightwell@crunchydata.com> wrote:

> I have discovered a bug with the COPY command, specifically related to RLS.
...
> Connecting as a non-privileged user provides the following results:
...
> COPY foo (a, b, c) TO stdout; -- fail
> ERROR:  missing FROM-clause entry for table "b"
> LINE 1: copy foo (a, b, c) to stdout;
...
> The issue seems to be that the target list for the resulting SELECT
> statement is not being built correctly. I have attached a proposed
> patch to fix this issue.  As well, I have added a few regression tests
> for this case.

Thanks for the report and the fix.

This seems a rather basic error to occur a year after release.

Is this a problem with the testing of RLS? What other RLS related
failures exist in other commands?

Perhaps we should extend rowsecurity test with a more comprehensive
set of tests rather than just fix the COPY one?

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: ICU integration