Skip site navigation (1) Skip section navigation (2)

Re: Automating Partitions in PostgreSQL - Query on syntax

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: vacuum(at)quantentunnel(dot)de
Cc: "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:39:37
Message-ID: 603c8f070904210839v53081901m18162716f66ff353@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Apr 21, 2009 at 11:13 AM,  <vacuum(at)quantentunnel(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-04-21 15:41:49
Subject: Re: New trigger option of pg_standby
Previous:From: Joshua D. DrakeDate: 2009-04-21 15:39:28
Subject: Re: License Issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group