Re: SELECT triggers - Table Partitioning - Mailing list pgsql-novice

From Yogesh Sharma
Subject Re: SELECT triggers - Table Partitioning
Date
Msg-id 4CCF9D04.1030600@catprosystems.com
Whole thread Raw
In response to SELECT triggers - Table Partitioning  (Majid Azimi <majid.merkava@gmail.com>)
List pgsql-novice
On 11/01/2010 02:33 PM, Majid Azimi wrote:
> Hi guys.
>
> In the documentation for triggers there is a sentence that says "you
> can't create select triggers". could someone explain why?
> When we use Table Partitioning how can we redirect SELECT queries to
> specific tables. If we don't have SELECT triggers then it will
> search all tables inherited from main table thus there is no
> performance optimization in SELECT queries.
> Is there any solution?
>
Way partition works is that you add a constraint on table and insert
data directly or via a trigger redirect it inherited tables.

When you query you use proper where clause so that if will hit
minimum tables based on "constraint" that was added earlier. This is
done via constraint exclusion.

pgsql-novice by date:

Previous
From: Majid Azimi
Date:
Subject: SELECT triggers - Table Partitioning
Next
From: Joe Carr
Date:
Subject: How to mark a transaction as SERIALIZABLE?