Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Дата
Msg-id 4785.1092756695@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1220: "alter table rename to" inside a transaction violates ACID ordering  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Список pgsql-bugs
Adam Sah <asah@speakeasy.net> writes:
> well, that's fine I suppose -- but then why does it work the other way
>     for DROP TABLE?

It doesn't work the other way for DROP.  The error you get in the DROP
case is a low-level error that really should never be seen by users.
But I see that as a problem with DROP, not with RENAME.

In my view, once the code has determined which relation (identified by
OID) is meant, it should be OK to take the OID as identifying the
relation henceforth.  This is not significantly different from the fact
that

    create table a (...);
    create view v as select * from a;
    alter table a rename to b;

will leave view v referencing b.  Would you claim that v should break?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Следующее
От: Graeme Hinchliffe
Дата:
Сообщение: LOAD not updating object in session