Re: pg_dump and grants to PUBLIC

From: Blair Lowe <postgresql(at)zedemail(dot)ca>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump and grants to PUBLIC
Date: 2006-05-11 16:41:51
Message-ID: 1147365712.3677.14.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2006-09-05 at 21:08 +0200, Martijn van Oosterhout wrote:
> On Tue, May 09, 2006 at 10:52:32AM -0600, Blair Lowe wrote:
> > In my test I do not see stuff2 either. The problem here is that I have
> > sensitive production data, so my tests are hard to read, and not able to
> > submit here.
>
> You don't need to show any data, just the schema will be enough. An
> example you could show us would be something like below. Replace
> 'mydatabase' with a database and 'sometable' with a table name you know
> is not is 'mydatabase' and so should not be in the dump but you say is
> because it's in some other database.
>
> $ psql mydatabase
> psql version x.x.x
> mydatabase> select oid from pg_class where relname = 'sometable';
> oid
> -------
> (0 rows)
> mydatabase> \q
> $ pg_dump -s mydatabase | grep 'CREATE.*sometable'
> < show us the output here >

[root(at)www etc]# psql temp99
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

temp99=# select oid from pg_class where relname = 'bbs_auth_access';
oid
-------
17736
(1 row)
temp99=# \q
[root(at)www etc]# pg_dump -s temp99 | grep 'CREATE.*bbs_auth_access'
CREATE TABLE bbs_auth_access (
[root(at)www etc]#

>
> If it turns out it is in template1, you can fix this without deleting
> any production data. Easiest is just login and delete stuff, though you
> can recreate it using the steps in the docs.

What is the SQL to find the oid 17736?

>
> Hope this helps,

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Gibson 2006-05-11 16:43:50 Re: string primary key
Previous Message Scott Marlowe 2006-05-11 16:40:57 Re: string primary key