X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3C97652800 for ; Mon, 20 Jun 2005 04:56:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77113-07 for ; Mon, 20 Jun 2005 07:56:32 +0000 (GMT) Received: from zenon.apartia.org (zenon.apartia.fr [82.66.93.83]) by svr1.postgresql.org (Postfix) with ESMTP id 9B01652822 for ; Mon, 20 Jun 2005 04:56:32 -0300 (ADT) Received: from argos (argos.apartia.fr [10.0.3.105]) by zenon.apartia.org (Postfix) with ESMTP id 78E5411088DA; Mon, 20 Jun 2005 09:56:33 +0200 (CEST) Received: by argos (Postfix, from userid 1018) id DB763341D1; Mon, 20 Jun 2005 09:56:31 +0200 (CEST) Date: Mon, 20 Jun 2005 09:56:31 +0200 From: David Pradier To: Michael Glaesemann Cc: postgresql sql list Subject: Re: UPDATEABLE VIEWS ... Examples? Message-ID: <20050620075631.GD15942@apartia.fr> References: <20050616180356.Y90456@ganymede.hub.org> <20050620071604.GB15942@apartia.fr> <3E0EA84A-7A3B-4BDC-ADB2-08D664551CD8@myrealbox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E0EA84A-7A3B-4BDC-ADB2-08D664551CD8@myrealbox.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/249 X-Sequence-Number: 21850 > >This is maybe a newbie question, but what is the difference with a > >materialized view ? > > As I understand it (and that understanding may be wrong) a > materialized view is a table that holds the values of a view from > some point in time. A view is a "saved" subselect. Everything you > call a view, the PostgreSQL backend re-evaluates the definition of > the view. A materialized view is only as accurate as the last time it > was updated. Things such as triggers can be used to keep the > materialized view updated. The key issue with materialized views is > to make sure it's always up-to-date with the evaluation of the view. Thanks Michael, I already know what is a materialized view. I often use them, systematically updated with some triggers. It's an updatable view that i didn't knew. It opens some perspectives in programmation, methinks :-) Thanks all the same, David -- dpradier@apartia.fr - tel: 01.46.47.21.33 - fax: 01.46.47.21.37