Re: Creating views - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Creating views
Date
Msg-id 45F11BF8.4080809@archonet.com
Whole thread Raw
In response to Creating views  ("Kashmira Patel \(kupatel\)" <kupatel@cisco.com>)
List pgsql-sql
Kashmira Patel (kupatel) wrote:
> Hi all, Is it possible to create views that take parameters?
> Basically, I have to create some very complex historical reports, and
> as of now I am using temporary tables to store intermediate query
> results. I calculate values based on the content of these temporary
> tables and use them in the final result. I would like to eliminate
> the need for temporary tables and use views instead, as the data copy
> between the temp tables is taking quite some time.

You can write a function (in SQL even) that would basically be a 
parameterised view.

However, views don't "store" anything, so whether you see an improvement 
in speed will depend on how long it takes to do your calculations.

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: "Bart Degryse"
Date:
Subject: Re: A form of inheritance with PostgreSQL
Next
From: Moritz Kobel
Date:
Subject: Table inherit & foreign key problem