Re: Error message for CREATE VIEW is confusing

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Error message for CREATE VIEW is confusing
Дата
Msg-id CA+TgmobaA8NucDFxLa-4Fvv+Z70O=tOGM5GTP8-nV3_A1NbdWw@mail.gmail.com
обсуждение исходный текст
Ответ на Error message for CREATE VIEW is confusing  (Pavel Golub <pavel@microolap.com>)
Список pgsql-hackers
On Wed, Jul 31, 2013 at 6:49 AM, Pavel Golub <pavel@microolap.com> wrote:
> Hello, PostgreSQL.
>
> Let's assume we have created MATERIALIZED VIEW, e.g.
>
> CREATE MATERIALIZED VIEW customer_v AS SELECT ....;
>
> Then one wants to redefine this view as a regular view, e.g.
>
> CREATE OR REPLACE VIEW customer_v AS ....;
>
> Error is rising:
> ERROR:  "customer_v" is not a view
> ********** Error **********
> ERROR: "customer_v" is not a view
> SQL-state: 42809
>
> Should we change error message to something like "customer_v" has wrong
> object type" (according to errcode appendix)? Or should we change word
> "view" to "regular view" since we have "materialized" already, e.g.
> "customer_v" is not a regular view"?

Well, this is another instance of the general problem that some people
think that "view" ought to mean "materialized view", but it doesn't.
I'm not inclined to go too crazy trying to clear up all possible
ambiguities in this area, because I think it's a rat's nest that will
never really work out well as long as people think those two things
are somehow the same.  One idea is to add a hint:

HINT: It is a materialized view.

But I'm not sure whether that's a good idea or not.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Atri Sharma
Дата:
Сообщение: Re: Should we automatically run duplicate_oids?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])