pg_restore single table privileges/indexes

From: Jeff Amiel <becauseimjeff(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_restore single table privileges/indexes
Date: 2007-02-06 17:32:52
Message-ID: 42575.94101.qm@web60811.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"PostgreSQL 8.2.0 on i386-portbld-freebsd6.0, compiled by GCC cc (GCC) 3.4.4 [FreeBSD] 20050518"

We just switched from 'pg_dumpall" to "pg_dump -format=c" for our nightly backups.
I wanted to experiment with restoring a single table (if the need should ever arise) from the dump file.

I use the --clean option on the restore to drop the table first

pg_restore -U pgsql --table codes --dbname devl --clean backup.pgsql

It seems to work fine with no issues. However, none of the privileges are set.
I checked the dump with grep and sure enough, they are there:

root(at)server# grep --binary-files=text "GRANT SELECT ON TABLE codes TO jboss;" backup.pgsql
GRANT SELECT ON TABLE codes TO jboss;

So...the privileges are in the dump...but do not get restored. Is this issue unique to the --table option? Is there some way to force it to restore the privileges?

I also notice that the indexes are not restored...that I understand. I guess I have to do separate --index for each index on the table, correct?

Any help would be appreciated.


---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John McCawley 2007-02-06 17:38:04 Creating an index on a live database
Previous Message Jim C. 2007-02-06 17:26:57 Re: Postgres SQL Syntax