From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Bug #489: pg_dump places GRANT queries before CREATE VIEW |
Date: | 2001-10-22 18:12:49 |
Message-ID: | 200110221812.f9MICnL57349@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Edwin Grubbs (egrubbs(at)rackspace(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
pg_dump places GRANT queries before CREATE VIEW
Long Description
System Configuration
---------------------
Architecture (example: Intel Pentium) : AMD Athlon
Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.7 ELF
PostgreSQL version (example: PostgreSQL-6.5.3): PostgreSQL-7.1.2
Compiler used (example: gcc 2.8.0) : egcs-1.1.2
Please enter a FULL description of your problem:
------------------------------------------------
After a pg_dumpall and restore, all the permissions on all the views
were gone. The permissions for all the other tables were fine.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
createuser nobody
createdb test
psql test -c 'create view myview as select 1 as val;'
psql test -c 'grant all on myview to nobody;'
pg_dump test > test.sql
createdb test2
psql test2 < test.sql
psql test2 -c '\z'
This will show no access permissions for myview in the test2 database.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
At least in the test case, the problem is caused by the GRANT queries
being issued before CREATE VIEW; therefore, pg_dump just needs to
reorder the queries.
Sample Code
No file was uploaded with this report
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Studenmund | 2001-10-22 19:21:41 | Enabling --debug causes regression test failure. |
Previous Message | Alvaro Herrera | 2001-10-22 16:53:10 | ALL in SELECT syntax \h psql flawed? |