On Sunday, December 18, 2011 04:00:14 PM amit sehas wrote:
> Yes i was trying to determine how to make a View work in this situation.
> From reading the details on PostgreSQL Views are not persistent, ie they
> are just a SQL query short hand rather than actually creating any physical
> entity backing it (i would imagine that creating such a physical backing
> would be inordinately difficult to keep updated given the arbitrary
> original query that was utilized to define it...)...
>
The views are not materialized. But the SQL they execute does make use of
existing indexes.
> Is there some way inheritence can play a part in this such as
>
> a) define a base table with 3 fields and place indexes on each one of the
> 3 fields
>
> b) define the 10 types in which we just override the name of each one of
> the 3 fields (i do not know if there is such a concept as overriding the
> name of a field...) perhaps a computed field which depends upon the field
> inherited...
>
> that is as close as i could think of how to solve such as issue...but i am
> not sure how inheritance works in POstgres...
Inheritance will not help you with columns with different names. And indexes
aren't inherited anyway.