Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Ingres > Re: [Info-Ingre...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 5938 of 6256
Post > Topic >>

Re: [Info-Ingres] subpartitions and date functions

by Karl & Betty Schendel <schendel@[EMAIL PROTECTED] > Jul 1, 2008 at 11:21 AM

On Jul 1, 2008, at 10:39 AM, Martin Bowes wrote:
>

> I'm trying to set up a table with a sub-partitioned on month of  
> year, but the date functions don't appear to be allowed within the  
> syntax…
>

That's right, and there isn't any quick way to allow it that I can  
think of, either.
The partitioning catalogs and data structures really expect to be  
operating
on constants.  Extending them to functions will be a head-scratcher.

At the moment, all I can think of is to either range partition by  
month and
break it all out explicitly, or add a "captured_month" column to the  
table
(possibly updated by the old rule trick if your data source doesn't  
want to
hear about it) and use that for the list partitioning.

By the way, since one can reasonably expect months to be in the range  
1..12,
you can save yourself an empty partition by defining the last one as
values (12,DEFAULT).  That satisfies the rules without leaving empty
partitions lying around.

Karl

> modify eyeballz to btree on captured_date
>
> with partition=((
>
>     range on captured_date
>
>         partition eyeballz_pre_2008   values <  '1/1/2008',
>
>         partition eyeballz_2008       values <  '1/1/2009',
>
>         partition eyeballz_post_2008  values >=  '1/1/2009')
>
>         subpartition (list on date_part('month', captured_date)
>
>             partition eyeballz_sp_jan values (1),
>
> ...
>
 




 1 Posts in Topic:
Re: [Info-Ingres] subpartitions and date functions
Karl & Betty Schendel  2008-07-01 11:21:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 21:15:15 CST 2008.