8.1beta1: pg_dumpall -c does delete from pg_shadow?

Поиск
Список
Период
Сортировка
Искать

8.1beta1: pg_dumpall -c does delete from pg_shadow?

От:
mark@mark.mielke.cc
Дата:
Hey all.

Playing around, and pg_dumpall -c does delete from pg_shadow as
part of the role cleanup?

Our friendly psql complains that pg_shadow is a view:
   psql::11: ERROR:  cannot delete from a view   HINT:  You need an unconditional ON DELETE DO INSTEAD rule.

And then:
   psql::13: ERROR:  role "" already exists   psql::14: ERROR:  role "" already exists   psql::15: ERROR:  role "" already exists

I assume this is easily reproduceable for others...

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada
 One ring to rule them all, one ring to find them, one ring to bring them all                      and in the darkness bind them...
                          http://mark.mielke.cc/


Re: 8.1beta1: pg_dumpall -c does delete from pg_shadow?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
mark@mark.mielke.cc writes:
> Our friendly psql complains that pg_shadow is a view:
>     psql::11: ERROR:  cannot delete from a view
>     HINT:  You need an unconditional ON DELETE DO INSTEAD rule.

Yeah, this is on the open-items list; the DELETE FROM is broken (and
was always a pretty bogus approach anyway), but it's not very clear
what to do instead.
		regards, tom lane

FAQ