Error message for CREATE VIEW is confusing

From: Pavel Golub <pavel(at)microolap(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Error message for CREATE VIEW is confusing
Date: 2013-07-31 10:49:24
Message-ID: 951615835.20130731134924@gf.microolap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gf(dot)microolap(dot)com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2013-07-31 12:33:03 REGEXP_MATCHES() strange behavior with '^' and '$' pattern
Previous Message Etsuro Fujita 2013-07-31 09:50:50 Typo fix in bufmgr.c