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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to