From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | getting confused parsing ACLITEMS... |
Date: | 2003-08-08 08:31:01 |
Message-ID: | 145b01c35d87$67184dc0$2800a8c0@mars |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-08-08 09:09:09 | Re: getting confused parsing ACLITEMS... |
Previous Message | Weiping He | 2003-08-08 08:19:16 | Re: compile error of 7.4 beta1 on AIX 4.3.3 |