Re: Postgresql partitioning problems & suggested solutions - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Postgresql partitioning problems & suggested solutions
Date
Msg-id 87bqb3un5q.fsf@oxford.xeocode.com
Whole thread Raw
In response to Postgresql partitioning problems & suggested solutions  (SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com>)
List pgsql-hackers
"SHARMILA JOTHIRAJAH" <sharmi_jo@yahoo.com> writes:

> Now for
> SELECT * FROM Foo WHERE b='2'
>
> it should know to access only Foo_2, I suppose it could be done
> with a rule, but that should work even if b='2' is implicitly
> given (not just if b = <constant>) is stated explicitly.

This much already exists in Postgres. If you define constraints on the
partitions with an expression like (b=2) and turn on the constraint_exclusion
guc variable Postgres will do this.

The rest of your message lists a number of other interesting avenues but I'm
not sure it's the only way to go about accomplishing the things you need. I
would be interested to know more generally what problems you anticipate with
your application and what your needs are at a high level. The solutions you
propose are pretty specific and there have been other techniques proposed in
the past which may be more attractive than these specific solutions.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: SHARMILA JOTHIRAJAH
Date:
Subject: Postgresql partitioning problems & suggested solutions
Next
From: andy
Date:
Subject: 8.3 full text search docs