Re: Automating Partitions in PostgreSQL - Query on syntax - Mailing list pgsql-hackers

From vacuum@quantentunnel.de
Subject Re: Automating Partitions in PostgreSQL - Query on syntax
Date
Msg-id 20090421164239.311000@gmx.net
Whole thread Raw
In response to Re: Automating Partitions in PostgreSQL - Query on syntax  ("steven king" <vacuum@quantentunnel.de>)
List pgsql-hackers
> 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>]

some examples:

CREATE TABLE ttt (id integer,txt varchar
)

SWITCH id % 3
CASE 0 TABLE <table> [IN <table_space>]
CASE 1 TABLE <table> [IN <table_space>]
CASE 2 TABLE <table> [IN <table_space>]
DEFAULT <table> [IN <table_space>]

or 

SWITCH lower(txt)
CASE 'hello' TABLE <table> [IN <table_space>]
CASE 'world' TABLE <table> [IN <table_space>]
CASE 'foo' TABLE <table> [IN <table_space>]
CASE 'bar' TABLE <table> [IN <table_space>]
DEFAULT <table> [IN <table_space>]

-- 
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


pgsql-hackers by date:

Previous
From: "steven king"
Date:
Subject: Re: Automating Partitions in PostgreSQL - Query on syntax
Next
From: "Kevin Grittner"
Date:
Subject: Re: psql with "Function Type" in \df