Partitioning by letter question - Mailing list pgsql-sql

From John Lister
Subject Partitioning by letter question
Date
Msg-id 4B636022.90804@kickstone.com
Whole thread Raw
Responses Re: Partitioning by letter question  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-sql
Hi, I was wondering if this was possible. I'm trying to partition a 
table, which is straightforward enough thanks to the great 
documentation, but i have a question:

If I partition using something like a product_id for example and have 
check constraints such as (id>=1000 and id<2000) then everything is fine 
and the planner correctly uses the right subset of the tables. However I 
would like to partition by the first letter and using something like 
this substr(word,1,1)='a' is ignored by the planner. From reading the 
docs I understand that complicated check constraints are ignored, but 
this doesn't seem overly complicated.

Am i doing  something wrong or is there another better way to do this

Thanks

John


pgsql-sql by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: rename primary key
Next
From: Scott Marlowe
Date:
Subject: Re: Partitioning by letter question