From: | vacuum(at)quantentunnel(dot)de |
---|---|
To: | "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Automating Partitions in PostgreSQL - Query on syntax |
Date: | 2009-04-21 15:13:08 |
Message-ID: | 20090421151308.191260@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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>]
)
-------- Original-Nachricht --------
> Datum: Tue, 21 Apr 2009 11:11:54 -0300
> Von: "Dickson S. Guedes" <listas(at)guedesoft(dot)net>
> An: vacuum(at)quantentunnel(dot)de, pgsql-hackers(at)postgresql(dot)org
> Betreff: Re: [HACKERS] Automating Partitions in PostgreSQL - Query on syntax
> Vacuum, I guess you forgot to reply-to-all. ":)
>
> Em Ter, 2009-04-21 às 16:05 +0200, vacuum(at)quantentunnel(dot)de escreveu:
> > why not partitions by "conditions"?
> >
> > you can do that in similar way how "case when then " works ..
> >
> > CREATE PARTITIONS ON <table>
> > SWITCH <any expression>
> > CASE <value> THEN <part_1>,
> > CASE <value> THEN <part_2>,
> > CASE <value> THEN <part_3>,
> > DEFAULT emp_default;
> >
> > with a difference to case: <value> may not be a boolean expression
> >
> > or you can do it as CASE works
> >
> > forinstance:
> >
> > CREATE PARTITIONS ON emp (
> > CASE WHEN <value> THEN emp_xxx,
> > CASE WHEN <value> THEN emp_yyy,
> > CASE WHEN <value> emp_zzz,
> > ELSE emp_default
> > END CASE;
> > );
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 21 Apr 2009 10:46:41 -0300
> > > Von: "Dickson S. Guedes" <listas(at)guedesoft(dot)net>
> > > An: Kedar Potdar <kedar(dot)potdar(at)gmail(dot)com>,
> pgsql-hackers(at)postgresql(dot)org
> > > Betreff: Re: [HACKERS] Automating Partitions in PostgreSQL - Query on
> syntax
> >
> > > Em Ter, 2009-04-21 às 17:20 +0530, Kedar Potdar escreveu:
> > > > Hi ,
> > > >
> > > > We are working on a patch to automate partitioning in PostgreSQL.
> > >
> > > Nice. ":)
> > >
> > > > For Range partitions, we have proposed the syntax which is as
> > > > follows
> > > >
> > > > (...)
> > > > 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?
> > >
> > >
> > > []s
> > > --
> > > Dickson S. Guedes
> > > mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
> > > http://guedesoft.net - http://planeta.postgresql.org.br
> >
> --
> Dickson S. Guedes
> mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
> http://guedesoft.net - http://planeta.postgresql.org.br
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | May, Randy | 2009-04-21 15:13:48 | License Issue |
Previous Message | Bruce Momjian | 2009-04-21 14:52:47 | Re: BUG #4768: FATAL:could not reattach to shared memory:487 |