Re: Automating Partitions in PostgreSQL - Query on syntax
От
Nikhil Sontakke
Тема
Re: Automating Partitions in PostgreSQL - Query on syntax
Дата
Msg-id
a301bfd90904210746t6b3b935bt43275ad7c7aa016@mail.gmail.com
Ответ на
Re: Automating Partitions in PostgreSQL - Query on syntax (Pavel Stehule)
Список
Дерево обсуждения
Automating Partitions in PostgreSQL - Query on syntax Kedar Potdar <kedar.potdar@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax "Dickson S. Guedes" <listas@guedesoft.net>
Re: Automating Partitions in PostgreSQL - Query on syntax Kedar Potdar <kedar.potdar@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax "Dickson S. Guedes" <listas@guedesoft.net>
Re: Automating Partitions in PostgreSQL - Query on syntax Pavel Stehule <pavel.stehule@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Greg Stark <stark@enterprisedb.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Kedar Potdar <kedar.potdar@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Robert Haas <robertmhaas@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Csaba Nagy <nagy@ecircle-ag.com>
Re: Automating Partitions in PostgreSQL - Query on syntax vacuum@quantentunnel.de
Re: Automating Partitions in PostgreSQL - Query on syntax Robert Haas <robertmhaas@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Tom Lane <tgl@sss.pgh.pa.us>
Re: Automating Partitions in PostgreSQL - Query on syntax Simon Riggs <simon@2ndQuadrant.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Zeugswetter Andreas OSB sIT <Andreas.Zeugswetter@s-itsolutions.at>
Re: Automating Partitions in PostgreSQL - Query on syntax Tom Lane <tgl@sss.pgh.pa.us>
Re: Automating Partitions in PostgreSQL - Query on syntax Robert Haas <robertmhaas@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Robert Haas <robertmhaas@gmail.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Greg Stark <greg.stark@enterprisedb.com>
Re: Automating Partitions in PostgreSQL - Query on syntax Grzegorz Jaskiewicz <gj@pointblue.com.pl>
-1, this is really ugly>> > (...)
>> > PARTITION BY RANGE (emp_id)
>> > (
>> > emp_500 (START 1 END 500),
>> > emp_1500 (START 500 END 1500),
>> > emp_4000 (START 1520 END 4000)
>> > );
>>
>> What if I need more columns to set the partitions?
>
>
> You can do so by using command like this,
>
> CREATE TABLE emp (
> emp_id int not null primary key,
> designation text not null,
> location varchar(50) not null,
> jdate date not null,
> ctc float not null
>
> )
> PARTITION BY RANGE (jdate, emp_id)
> (
> emp_500 (START '01-01-1980',1 END '01-01-1990',500),
> emp_1500(START '01-01-1990',500 END '01-01-2000',1500+10),
> emp_4000 (START '1 Jan 2000',1500+20 END 'Jan 1, 2010', 4000-50)
> );
>
> You can have multiple columns as partition key attributes and values for
> these attributes should appear in the order specified.
Yeah, but what is the syntax for multiple column ranges in Orcl - is it similarly ugly?
As to Kedar's original question about gap-based ranges or Orcl style no-gap ranges, I don't think while partitioning such fine-grained gap-based ranges is such a stringent requirement.
Also specification of the maxvalue range in Orcl's case nicely maps to the overflow partition that is being mentioned upthread.
So whichever way we go maybe we can also consider accomodating the maxval for different datatypes if possible within the syntax itself.
Regards,
Nikhils
Pavel
>
>>
>>
>>
>> []s
>> --
>> Dickson S. Guedes
>> mail/xmpp: guedes@guedesoft.net - skype: guediz
>> http://guedesoft.net - http://planeta.postgresql.org.br
>
>--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--
http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления