On Tue, Apr 21, 2009 at 12:35 PM, steven king <vacuum(at)quantentunnel(dot)de> wrote:
> why a partition-key cannot be a complex expression?
>
> like this:
>
> SWITCH <expression>
> CASE <key_value> TABLE <table> [IN <table_space>]
> CASE <key_value> TABLE <table> [IN <table_space>]
> CASE <key_value> TABLE <table> [IN <table_space>]
> DEFAULT <table> [IN <table_space>]
>
> that is generic
Rather than SWITCH <expression> CASE <value> ... you probably would
want to reuse the existing PostgreSQL syntax of CASE <expression> WHEN
<value>...
But see my previous email for concerns about the performance of this
approach when the number of partitions is large.
...Robert