Re: Declarative partitioning
| От | Amit Langote |
|---|---|
| Тема | Re: Declarative partitioning |
| Дата | |
| Msg-id | 57146E6F.4060503@lab.ntt.co.jp обсуждение |
| Ответ на | Re: Declarative partitioning (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
| Ответы |
Re: Declarative partitioning
|
| Список | pgsql-hackers |
Hi,
On 2016/04/15 18:46, Ashutosh Bapat wrote:
>
> 3. PartitionKeyData contains KeyTypeCollInfo, whose contents can be
> obtained by calling functions exprType, exprTypemod on partexprs. Why do we
> need to store that information as a separate member?
There was no KeyTypeCollInfo in early days of the patch and then I found
myself doing a lot of:
partexprs_item = list_head(key->partexprs);
for (attr in key->partattrs)
{ if (attr->attnum != 0) { // simple column reference, get type from attr } else { // expression,
gettype using exprType, etc. partexprs_item = lnext(partexprs_item); }
}
That ended up being quite a few places (though I managed to reduce the
number of places over time). So, I created this struct which is
initialized when partition key is built (on first open of the partitioned
table).
Thanks,
Amit
В списке pgsql-hackers по дате отправления: