From: | Blair Lowe <postgresql(at)zedemail(dot)ca> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump and grants to PUBLIC |
Date: | 2006-05-08 23:19:33 |
Message-ID: | 1147130374.16012.59.camel@localhost.localdomain |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-08 23:28:31 | Re: pg_dump and grants to PUBLIC |
Previous Message | Casey Duncan | 2006-05-08 23:17:53 | Re: What is your favorite front end for user interaction to postgresql databases? |