Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-generalpgsql-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

pgsql-hackers by date

Next:From: Rod TaylorDate: 2002-12-01 02:31:36
Subject: Re: Wishlist for 7.4: Plan stability
Previous:From: bpalmerDate: 2002-12-01 02:22:58
Subject: Re: Wishlist for 7.4: Plan stability

pgsql-advocacy by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group