Error message for CREATE VIEW is confusing - Mailing list pgsql-hackers

From Pavel Golub
Subject Error message for CREATE VIEW is confusing
Date
Msg-id 951615835.20130731134924@gf.microolap.com
Whole thread Raw
Responses Re: Error message for CREATE VIEW is confusing
List pgsql-hackers
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"?


-- 
With best wishes,Pavel                          mailto:pavel@gf.microolap.com




pgsql-hackers by date:

Previous
From: "Etsuro Fujita"
Date:
Subject: Typo fix in bufmgr.c
Next
From: Jeevan Chalke
Date:
Subject: REGEXP_MATCHES() strange behavior with '^' and '$' pattern