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

Re: Automating Partitions in PostgreSQL - Query on syntax

From: "steven king" <vacuum(at)quantentunnel(dot)de>
To: Greg Stark <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, listas(at)guedesoft(dot)net
Subject: Re: Automating Partitions in PostgreSQL - Query on syntax
Date: 2009-04-21 16:35:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
-------- Original-Nachricht --------
> Datum: Tue, 21 Apr 2009 16:37:15 +0100
> Von: Greg Stark <stark(at)enterprisedb(dot)com>
> An: vacuum(at)quantentunnel(dot)de
> CC: "Dickson S. Guedes" <listas(at)guedesoft(dot)net>, pgsql-hackers(at)postgresql(dot)org
> Betreff: Re: [HACKERS] Automating Partitions in PostgreSQL - Query on syntax

> On Tue, Apr 21, 2009 at 4:13 PM,  <vacuum(at)quantentunnel(dot)de> wrote:
> > oh sorry ..
> >
> > but what I miss in this discussion - where we can define tablespace?
> >
> >
> > CASE WHEN <condition> THEN emp_xxx [IN <tablespace>],
> The point that you want to be able to set tablespaces is a good one
> though. The general point is that you're going to want to be able to
> set arbitrary table storage options though. That might mean you need a
> separate DDL command for each partition.

not in real - currently, when i create a table, the specified tablespaces must exist. this restriction you can apply to CREATE PARTITIONS too.
> The main thing the existing system lacks is an idea of what the
> partition key is and how to determine which partition a given key
> belongs in without checking every single partition. Figure out how to
> accomplish this in the backend and people will be happy to offer their
> suggestions for syntax.

why a partition-key cannot be a complex expression? 

like this:

SWITCH <expression>
CASE <key_value> TABLE <table> [IN <table_space>]
CASE <key_value> TABLE <table> [IN <table_space>]
CASE <key_value> TABLE <table> [IN <table_space>]
DEFAULT <table> [IN <table_space>]

that is generic

> -- 
> greg
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:

In response to


pgsql-hackers by date

Next:From: vacuumDate: 2009-04-21 16:42:39
Subject: Re: Automating Partitions in PostgreSQL - Query on syntax
Previous:From: David FetterDate: 2009-04-21 16:33:26
Subject: Re: psql with "Function Type" in \df

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