getting confused parsing ACLITEMS...

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема getting confused parsing ACLITEMS...
Дата
Msg-id 145b01c35d87$67184dc0$2800a8c0@mars
обсуждение исходный текст
Список pgsql-hackers
This is the situation, I create a user called "

test=# create user """";
CREATE USER
test=# drop user """";
DROP USER
test=# create user """";
CREATE USER
test=# create table temp(a int4);
CREATE TABLE
test=# grant select on temp to """";
GRANT
test=# \dp temp               Access privileges for database "test"Schema | Table |                  Access privileges
--------+-------+-----------------------------------------------------public | temp  |
{chriskl=a*r*w*d*R*x*t*/chriskl,"\"\"\"=r/chriskl"}
(1 row)

OK, so the second aclitem is:
"\"\"\"=r/chriskl"

So how on earth does that quoting work????

If I remove the first and last quote (assuming the whole thing is quoted),
unescape it, then I get this:

"""=r/chriskl

Which I cannot parse, as """ doens't mean anything!  I think that the second
aclitem should appear like this;
"\"\\\"\"=r/chriskl"

Which will (after removing string quotes and unescaping), reduce to this:

"\""=r/chriskl

I notice that it doesn't confuse postgres itself though:

test=# revoke select on temp from """";
REVOKE
test=# \dp temp      Access privileges for database "test"Schema | Table |        Access privileges
--------+-------+----------------------------------public | temp  | {chriskl=a*r*w*d*R*x*t*/chriskl}
(1 row)

So is there a bug here?

Chris



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

Предыдущее
От: Weiping He
Дата:
Сообщение: Re: [GENERAL] compile error of 7.4 beta1 on AIX 4.3.3
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: getting confused parsing ACLITEMS...