HELP! BUG? pg_dump mucks up grant/revoke

From: Keith F Irwin <kirwin14(at)home(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: HELP! BUG? pg_dump mucks up grant/revoke
Date: 2001-07-17 22:20:49
Message-ID: Pine.LNX.4.33.0107070852060.13101-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general


Hi:

I'm using pg 7.1.2.

I've got a database with views which have permissions granted to a certain
user. Defined something like:

create view whatever....

revoke all on whatever from user
grant select on whatever to user

(If I get the syntax wrong, it doesn't matter here.)

THEN, I do a pg_dump:

pg_dump --attribute-inserts database > dump.sql

all well and good expect for one thing: the grant/revoke lines appear
BEFORE the create view definitions, so when I read the dump back into
postgres via:

dropdb database
createdb database
cat dump.sql | psql database

I get "relation doesn't exist" errors and my "user" no longer has
permission to use those views. This is a bug, isn't it?

Keith

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-07-18 08:18:23 libpgtcl doesn't use UTF encoding of TCL
Previous Message pgsql-bugs 2001-07-17 22:14:42 some timestamps are wrong from JDBC

Browse pgsql-general by date

  From Date Subject
Next Message Grant 2001-07-17 22:33:02 Re: [SQL] epoch to show millseconds
Previous Message Dr. Evil 2001-07-17 22:08:01 PG rules!