Re: Hard-coded PUBLIC in pg_dump

From: "Nicolai Tufar" <ntufar(at)apb(dot)com(dot)tr>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hard-coded PUBLIC in pg_dump
Date: 2002-12-01 02:29:27
Message-ID: 00c301c298e1$785dc530$8016a8c0@apb.com.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers

----- Original Message -----
From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Nicolai Tufar" <ntufar(at)apb(dot)com(dot)tr>; <pgsql-hackers(at)postgresql(dot)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 ON TABLE maras2.esya TO 'PUBLIC';
ERROR: parser: parse error at or near "'PUBLIC'" at character 38
apb=> GRANT SELECT ON 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.

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message greg 2002-12-01 03:08:58 Slashdot article on PostgreSQL 7.3
Previous Message Christopher Kings-Lynne 2002-12-01 02:07:35 Re: eWeek Article

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-12-01 03:16:08 Re: 7.4 Wishlist
Previous Message Christopher Kings-Lynne 2002-12-01 02:05:29 Re: Hard-coded PUBLIC in pg_dump

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-12-01 02:31:36 Re: Wishlist for 7.4: Plan stability
Previous Message bpalmer 2002-12-01 02:22:58 Re: Wishlist for 7.4: Plan stability