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 987FF5280D for ; Mon, 20 Jun 2005 04:38:12 -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 75304-02 for ; Mon, 20 Jun 2005 07:38:03 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by svr1.postgresql.org (Postfix) with ESMTP id 4F96A5280B for ; Mon, 20 Jun 2005 04:38:02 -0300 (ADT) Received: from [172.16.1.182] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.5 $ on Linux via secured & encrypted transport (TLS); Mon, 20 Jun 2005 01:38:00 -0600 In-Reply-To: <20050620071604.GB15942@apartia.fr> References: <20050616180356.Y90456@ganymede.hub.org> <20050620071604.GB15942@apartia.fr> Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3E0EA84A-7A3B-4BDC-ADB2-08D664551CD8@myrealbox.com> Cc: postgresql sql list Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: UPDATEABLE VIEWS ... Examples? Date: Mon, 20 Jun 2005 16:37:57 +0900 To: David Pradier X-Mailer: Apple Mail (2.730) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/248 X-Sequence-Number: 21849 On Jun 20, 2005, at 4:16 PM, David Pradier wrote: > 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. Michael Glaesemann grzm myrealbox com