From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Golub <pavel(at)gf(dot)microolap(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Error message for CREATE VIEW is confusing |
Date: | 2013-08-02 14:19:09 |
Message-ID: | CA+TgmobaA8NucDFxLa-4Fvv+Z70O=tOGM5GTP8-nV3_A1NbdWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 31, 2013 at 6:49 AM, Pavel Golub <pavel(at)microolap(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2013-08-02 14:54:42 | Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Previous Message | Atri Sharma | 2013-08-02 14:15:56 | Re: Should we automatically run duplicate_oids? |