From: | vacuum(at)quantentunnel(dot)de |
---|---|
To: | stark(at)enterprisedb(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Automating Partitions in PostgreSQL - Query on syntax |
Date: | 2009-04-21 16:42:39 |
Message-ID: | 20090421164239.311000@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-04-21 16:45:19 | Re: psql with "Function Type" in \df |
Previous Message | steven king | 2009-04-21 16:35:50 | Re: Automating Partitions in PostgreSQL - Query on syntax |