From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Add CREATE RECURSIVE VIEW syntax |
Date: | 2013-02-28 14:38:35 |
Message-ID: | CAA-aLv5RhwyVDOzjSc69wtMXeh+yjXxmG=MRJXj=L0ViFdUn4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On 1 February 2013 03:33, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Add CREATE RECURSIVE VIEW syntax
>
> This is specified in the SQL standard. The CREATE RECURSIVE VIEW
> specification is transformed into a normal CREATE VIEW statement with a
> WITH RECURSIVE clause.
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."
--
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-02-28 14:55:18 | Re: Materialized views WIP patch |
Previous Message | Heikki Linnakangas | 2013-02-27 19:51:36 | Re: pgsql: Add support for piping COPY to/from an external program. |