pg_dump dumps view ACLs before the view

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема pg_dump dumps view ACLs before the view
Дата
Msg-id 200105310001.f4V011V73603@hub.org
обсуждение исходный текст
Список pgsql-bugs
Mark Reibert (mark.reibert@datasoft.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
pg_dump dumps view ACLs before the view

Long Description
System Configuration:
  - Intel Pentium
  - Red Hat 6.2 (Linux 2.2.19)

Version [output of "select version()"]:
  PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66

Problem Description:

For views, pg_dump dumps the ACLs before the view. This causes errors on restore since the ACLs are applied before the
viewis created. The problem does not appear to exist with tables and sequences. The example in the "Example Code"
sectionwill illustrate. The workaround is to hand edit the TOC list and place the view ACLs after the view. 


Sample Code
[mark@corsair mark]$ pg_dump -Fc wats > wats.pgdmp
[mark@corsair mark]$ pg_restore -l wats.pgdmp > wats.list
[mark@corsair mark]$ cat wats.list
;
; Archive created at Wed May 30 16:49:41 2001
;     dbname: wats
;     TOC Entries: 801
;     Compression: -1
;     Dump Version: 1.5-6
;     Format: CUSTOM
;
;
; Selected TOC Entries:
;
346; 18720 FUNCTION "plpgsql_call_handler" () postgres
347; 18721 PROCEDURAL LANGUAGE plpgsql
2; 31617 SEQUENCE moneytransaction_id_seq watsadmin
4; 31617 ACL moneytransaction_id_seq
;
; [ Entries snipped here ]
;
125; 32396 TABLE statetype watsadmin
126; 32396 ACL statetype
127; 32426 TABLE actiontype watsadmin
128; 32426 ACL actiontype
;
; [ Entries snipped here ]
;
258; 34356 ACL waterrequests_view
257; 34377 VIEW waterrequests_view watsadmin
260; 34381 ACL customeraccount_view
259; 34412 VIEW customeraccount_view watsadmin

[mark@corsair mark]$ dropdb wats
DROP DATABASE
[mark@corsair mark]$ createdb wats
CREATE DATABASE
[mark@corsair mark]$ pg_restore -Fc -L wats.list -d wats wats.pgdmp
Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR:  Relation 'waterrequests_view' does
notexist 
'.


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Maxim Maletsky"
Дата:
Сообщение: RE: a typo in Docs, 7.1
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: REVOKE ... FROM username equals REVOKE ... FROM PUBLIC