pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feeddeclarative partition by list, "other values" syntax
2+ messages / 1 participants
[nested] [flat]
* declarative partition by list, "other values" syntax
@ 2017-11-20 20:52 legrand legrand <legrand_legrand@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: legrand legrand @ 2017-11-20 20:52 UTC (permalink / raw)
To: pgsql-general
Hello,
I was trying to create a partitionned table by list,
that has on special partition for "other values"
for exemple
create table wiki_data_part(
category varchar(20),
tim_id bigint,
pag_id bigint,
requests int,
size bigint
)
PARTITION BY LIST (category );
CREATE TABLE wiki_data_part_a PARTITION OF wiki_data_part
FOR VALUES IN ('ang.q','ace.mw', ...);
CREATE TABLE wiki_data_part_b PARTITION OF wiki_data_part
FOR VALUES IN ('bs.s','bh.mw','bar','br.d', ...);
How could I create a partition containing the other values (like MINVALUE,
MAXVALUE for range partition) ?
CREATE TABLE wiki_data_part_others PARTITION OF wiki_data_part
FOR VALUES IN (others);
could not find it in doc
https://www.postgresql.org/docs/10/static/sql-createtable.html
Thanks in advance
Regards
PAscal
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: declarative partition by list, "other values" syntax
@ 2017-11-26 21:22 legrand legrand <legrand_legrand@hotmail.com>
parent: legrand legrand <legrand_legrand@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: legrand legrand @ 2017-11-26 21:22 UTC (permalink / raw)
To: pgsql-general
Found it in pg 11devel:
CREATE TABLE wiki_data_part_a PARTITION OF wiki_data_part DEFAULT;
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-11-26 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 20:52 declarative partition by list, "other values" syntax legrand legrand <legrand_legrand@hotmail.com>
2017-11-26 21:22 ` legrand legrand <legrand_legrand@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox