Re: pg_dump and grants to PUBLIC

Поиск
Список
Период
Сортировка
От Blair Lowe
Тема Re: pg_dump and grants to PUBLIC
Дата
Msg-id 1147130374.16012.59.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: pg_dump and grants to PUBLIC  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: pg_dump and grants to PUBLIC  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_dump and grants to PUBLIC  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
On Mon, 2006-08-05 at 15:54 -0700, Joshua D. Drake wrote:
> > Not sure how else to describe this: basically if you type in pg_dump
> > <databasename> then all databases on the system that have table grants
> > to public are also in the backup .sql file with connect commands to the
> > other database users.
>
> Do you mean pg_dumpall? Because pg_dump will ONLY dump the database you
> specify, nothing else.

That would be nice, but it is not true.

Try this:

as user1: createdb test1
psql test1
>create table stuff1 (
  a CHAR(3)
);

as user2: createdb test2
pgsql test2
>create table stuff2 (
  a CHAR(3)
);
>grant all on stuff2 to PUBLIC;

now again as user1:
pg_dump test1

You should see the table stuff2 of test2 in there.

phpBB2 and many other mysql based software packages grant all tables to
PUBLIC so that the web user can alter stuff.

Blair.


В списке pgsql-general по дате отправления:

Предыдущее
От: Casey Duncan
Дата:
Сообщение: Re: What is your favorite front end for user interaction to postgresql databases?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump and grants to PUBLIC