the idea is, that this statement does not create a new kind of db-object. this "CREATE PARTITIONS" statement should be a meta-statement -> "meta" like the serial type.
with create paritions you can create all defined tables (maybe by inheritin from <table>) at once. but you're right - why this statement should not be able to define some other table-properties (except columns)?! please notice ... the statement below was only a draft - to show the intention. the major difference is the usage of conditions .. this could lead into creation of triggers with a lot of PL/pqSQL code or invocations of built-in functions. open your mind :) -------- Original-Nachricht -------- > Datum: Tue, 21 Apr 2009 11:39:37 -0400 > Von: Robert Haas <robertmh...@gmail.com> > An: vac...@quantentunnel.de > CC: "Dickson S. Guedes" <lis...@guedesoft.net>, pgsql-hackers@postgresql.org > Betreff: Re: [HACKERS] Automating Partitions in PostgreSQL - Query on syntax > On Tue, Apr 21, 2009 at 11:13 AM, <vac...@quantentunnel.de> wrote: > > oh sorry .. > > > > but what I miss in this discussion - where we can define tablespace? > > > > CREATE PARTITIONS ON <table> ( > > > > CASE WHEN <condition> THEN emp_xxx [IN <tablespace>], > > CASE WHEN <condition> THEN emp_yyy [IN <tablespace>], > > CASE WHEN <condition> emp_zzz [IN <tablespace>], > > ELSE emp_default [IN <tablespace>] > > ) > > Oh blech. That IN <tablespace> syntax is awful. What about the other > relevant parameters to CREATE TABLE - where are you going to put > those? > > WITH (<storage parameter>) > WITH OIDS > WITHOUT OIDS > > And what happens when I need to alter a partition after the fact, say > to move it to a new tablespace, or change the fillfactor? Since your > syntax doesn't give names to the partitions, how will I refer to them > later? > > ...Robert -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers