If I store my query results as views does it take more space of my memory in comparison to a table with query results?
Another question about views is that can I have new query based on the results of a query that is stored as views?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For Question 1
To answer your first question, you cannot store your query results as views but you can achieve a similar functionality using PostgreSQL’s
triggerfeature.PostgreSQL supports creation of
viewsnatively but not the creation ofmaterialized views(views that store your results) – but this can be handled using triggers. See http://wiki.postgresql.org/wiki/Materialized_Viewsviews do not take up RAM (“memory”).
For Question 2
And to answer the second question, to update a view in postgresql, you will need to use
CREATE RULE– http://www.postgresql.org/docs/devel/static/sql-createrule.html