Re: pgsql: Add CREATE RECURSIVE VIEW syntax - Mailing list pgsql-committers

From Peter Eisentraut
Subject Re: pgsql: Add CREATE RECURSIVE VIEW syntax
Date
Msg-id 1362111681.19221.1.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: pgsql: Add CREATE RECURSIVE VIEW syntax  (Thom Brown <thom@linux.com>)
List pgsql-committers
On Thu, 2013-02-28 at 14:38 +0000, Thom Brown wrote:
> Recursive views aren't updatable, but the error message may be
> considered a bit confusing to those who don't realise that recursive
> views are converted to recursive CTEs.
>
> postgres=# UPDATE vpeople SET last_person = last_person || ' test';
> ERROR:  cannot update view "vpeople"
> DETAIL:  Views containing WITH are not automatically updatable.
> HINT:  To make the view updatable, provide an unconditional ON UPDATE
> DO INSTEAD rule or an INSTEAD OF UPDATE trigger.
>
> Could we perhaps modify the error message in such scenarios to
> something like: "Views containing WITH, including recursive views, are
> not automatically updatable."

If a user saw that error message and did a \d on the view, it would show
the expanded form with WITH, so I think the message is fine as it is.



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Improve pg_upgrade commentary on multixact change
Next
From: Tom Lane
Date:
Subject: pgsql: Eliminate memory leaks in plperl's spi_prepare() function.