Обсуждение: ALTER/DROP table/view assymmetry

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

ALTER/DROP table/view assymmetry

От
"George Pavlov"
Дата:
This is minor, but just curious about the reasons for the assymetry
between ALTER and DROP with respect to tables vs. views.

* ALTER TABLE seems to work on both tables and views (even though ALTER
VIEW exists, albeit with a limited operation support).
* DROP TABLE works only on tables, not on views (dropping those requires
DROP VIEW).

Wouldn't it be cleaner if view operations worked only on views and table
ones on tables? At the very least maybe the docs for ALTER TABLE
probably should mention that it works on views too.

George


Re: ALTER/DROP table/view assymmetry

От
Tom Lane
Дата:
"George Pavlov" <gpavlov@mynewplace.com> writes:
> Wouldn't it be cleaner if view operations worked only on views and table
> ones on tables?

It's not worth the backwards-compatibility issues that would ensue.

            regards, tom lane