Re: Syntax for partitioning
От | Itagaki Takahiro |
---|---|
Тема | Re: Syntax for partitioning |
Дата | |
Msg-id | 20091125171743.92A1.52131E4D@oss.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Syntax for partitioning (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>) |
Ответы |
Re: Syntax for partitioning
|
Список | pgsql-hackers |
Here is an updated partitioning syntax patch. It implements syntax described here: http://wiki.postgresql.org/wiki/Table_partitioning#Syntax Changes: * New syntax: ALTER TABLE parent ATTACH/DETACH PARTITION. * Partition keys accepts an opclass name instead of an operator. * "lo <= key AND key < hi" is used in range check constraints instead of "key >= lo AND key < hi". ToDo items: * pg_get_partitiondef(parentOid, in_alter_format) might be ugly. It was designed only for psql -d and pg_dump. It might be cleaner if we move SQL formatter from the core function to client tools. In psql: pg_get_partitiondef(oid, false) Partitions: RANGE (sales_date) ( PARTITION sales_2006 VALUES LESS THAN '...', ... PARTITION sales_max VALUES LESS THAN MAXVALUE ) In pg_dump: pg_get_partitiondef(oid, true) ALTER TABLE parent PARTITION BY RANGE (sales_date); ALTER TABLE parent ATTACH PARTITION sales_2006 VALUES LESS THAN '...'; ... ALTER TABLE parent ATTACH PARTITION sales_max VALUES LESS THAN MAXVALUE; * The patch does not contain the following documentation, but I'll start writing them if the syntax is ok. - ddl-partitioning.sgml - alter-partition.sgml (new) - create-partition.sgml (new) - drop-partition.sgml (new) Note: * In fact, malloc was not a bug because it was the code in pg_dump. Comments welcome. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
Вложения
В списке pgsql-hackers по дате отправления: