Re: Views- Advantages and Disadvantages - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Views- Advantages and Disadvantages
Date
Msg-id 46422E5F.5030904@commandprompt.com
Whole thread Raw
In response to Re: Views- Advantages and Disadvantages  ("Dann Corbit" <DCorbit@connx.com>)
List pgsql-general
>>> Views can hide important information from the optimizer (especially
>>> index information).
>> Really? AIUI, views-at least in PostgreSQL-are implemented using
>> PostgreSQL's rule system: the entire query is rewritten to include
>> the view query, and the optimizer sees the rewritten query. What the
>> optimizer sees is the same as if the view were inlined in the
>> original query.
>
> That is a significant achievement, since many database systems do not
> have that ability.

Another advantage of views is the ability to give zero rights to access
the objects the view is on, but allow the user to execute the view
itself. This allows limiting the view to not only a specific where
clause but also specific columns the user will be able to view.

Joshua D. Drake

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>


--

       === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Views- Advantages and Disadvantages
Next
From: Brad Nicholson
Date:
Subject: Re: Dangers of fsync = off