Hard-coded PUBLIC in pg_dump
От | Nicolai Tufar |
---|---|
Тема | Hard-coded PUBLIC in pg_dump |
Дата | |
Msg-id | Pine.GSO.4.10.10212010328110.26370-100000@prana обсуждение исходный текст |
Ответ на | Re: Locale-dependent case conversion in {identifier} ("Nicolai Tufar" <ntufar@apb.com.tr>) |
Ответы |
Re: Hard-coded PUBLIC in pg_dump
|
Список | pgsql-hackers |
src/bin/pg_dump/pg_dump.c happen to have hard-coded PUBLIC role name. It completly breaks dumps when run with Turksh locale setting. In my opinion making it lower-case would do much good and no harm. A mini patch is given below. On the other hand, I was thinking about wrapping all the identifiers in dump files in single quotes. It is done in "SET SESSION AUTHORIZATION" clause. Is there a reason for not doing this with table and colum names? Regards, Nic *** ./src/bin/pg_dump/pg_dump.c.orig Sun Dec 1 03:23:56 2002 --- ./src/bin/pg_dump/pg_dump.c Sun Dec 1 03:24:48 2002 *************** *** 4918,4924 **** * wire-in knowledge about the default public privileges for different * kinds of objects. */ ! appendPQExpBuffer(sql, "REVOKE ALL ON %s %s FROM PUBLIC;\n", type, name); /* Make a workingcopy of acls so we can use strtok */ --- 4918,4924 ---- * wire-in knowledge about the default public privileges for different * kinds of objects. */ ! appendPQExpBuffer(sql, "REVOKE ALL ON %s %s FROM public;\n", type, name); /* Make a workingcopy of acls so we can use strtok */ *************** *** 4980,4986 **** if (eqpos == tok) { /* Empty left-hand side means"PUBLIC" */ ! appendPQExpBuffer(sql, "PUBLIC;\n"); } else if (strncmp(tok, "group", strlen("group ")) == 0) appendPQExpBuffer(sql, "GROUP %s;\n", --- 4980,4986 ---- if (eqpos == tok) { /* Empty left-hand side means"PUBLIC" */ ! appendPQExpBuffer(sql, "public;\n"); } else if (strncmp(tok, "group", strlen("group ")) == 0) appendPQExpBuffer(sql, "GROUP %s;\n",
В списке pgsql-hackers по дате отправления: