Re: Declarative partitioning grammar

Поиск
Список
Период
Сортировка
От Jeff Cohen
Тема Re: Declarative partitioning grammar
Дата
Msg-id D944AB1E-609C-4906-BF89-8F244F9EEEB0@greenplum.com
обсуждение исходный текст
Ответ на Re: Declarative partitioning grammar  (Mike <ipso@snappymail.ca>)
Ответы Re: Declarative partitioning grammar  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Jan 11, 2008, at 4:03 PM, Mike wrote:

> Pardon my ignorance as I've never actually used partitioning before  
> but
> plan to in the near future, but couldn't the grammar resemble a common
> WHERE clause more closely?
>>

Hi Mike,

Thanks for your suggestions.  The current syntax we chose is similar  
to syntax used by IBM, Oracle, and mysql, so it is familiar to folks  
who have used partitioning with other databases.  A WHERE clause  
would of course be understandable by everyone, but it makes error  
checking more difficult, since we want to ensure that partition  
specifications don't overlap.  In order to make such error checking  
feasible, we would have to restrict the set of predicates you can use  
in the WHERE clause, so it wouldn't be completely general anyway.

> Is there really a reason to not have a named partition as well?  
> Sure it
> saves a few keystrokes, but it makes trying to do anything with  
> them at
> a later date that much more difficult.

For the case of partition by HASH, you can just specify the number of  
buckets, so it might not be meaningful to name the partitions.  For  
range partitions, many users perform "rolling upgrades" on a regular  
basis, where they drop the oldest data and add a new partition with  
the latest data, so they might just refer to partitions by  
"position" (either an ordinal number or using a keyword like FIRST/ 
LAST).

kind regards,

Jeff



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: DECLARE CURSOR code question
Следующее
От: August Zajonc
Дата:
Сообщение: Re: Dynamic Partitioning using Segment Visibility Maps