Re: Hard-coded PUBLIC in pg_dump
От | Nicolai Tufar |
---|---|
Тема | Re: Hard-coded PUBLIC in pg_dump |
Дата | |
Msg-id | 00c301c298e1$785dc530$8016a8c0@apb.com.tr обсуждение исходный текст |
Ответ на | Hard-coded PUBLIC in pg_dump (Nicolai Tufar <ntufar@apb.com.tr>) |
Список | pgsql-hackers |
----- Original Message ----- From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> To: "Nicolai Tufar" <ntufar@apb.com.tr>; <pgsql-hackers@postgresql.org> Sent: Sunday, December 01, 2002 4:05 AM Subject: Re: [HACKERS] Hard-coded PUBLIC in pg_dump > > Hmmmm...does putting double quotes (eg. "PUBLIC") around the public word fix > it? No: apb=> GRANT SELECT ON TABLE maras2.esya TO "PUBLIC"; ERROR: user "PUBLIC" does not exist apb=> GRANT SELECT ONTABLE maras2.esya TO 'PUBLIC'; ERROR: parser: parse error at or near "'PUBLIC'" at character 38 apb=> GRANT SELECTON TABLE maras2.esya TO public; GRANT apb=> The problem here is case conversion from capital "I" to lower-case "i". In Turkish locale tolower('I') is not equal to 'i'. So, since "public" role is lower-case internally, why would we not make it lower-case in dump file. > > You can't put single quotes around table and column names. You need to use > double quotes as they are identifiers rather than literals. > > Bear in mind that some improvements have been made in Postgres 7.3 with > regards to quoting, so have you checked 7.3? I stand corrected. It is indeed has to be double-quoted. 7.3 is quoting only SET SESSION AUTHORIZATION 'role' clause in my dump. Possibly, because it has been added recently. Old code does not quote anything. > > Chris Regards, Nic.
В списке pgsql-hackers по дате отправления: