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

From Zeugswetter Andreas OSB sIT
Subject Re: Automating Partitions in PostgreSQL - Query on syntax
Date
Msg-id 6DAFE8F5425AB84DB3FCA4537D829A561D81B934D6@M0164.s-mxs.net
Whole thread Raw
In response to Re: Automating Partitions in PostgreSQL - Query on syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Automating Partitions in PostgreSQL - Query on syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Which leads me to the same conclusion: anything as complicated as CASE
> is the wrong design.  But perhaps for slightly different reasons.

What I like about the sql CASE is, that it is expression based, and thus
allows full flexibility in partitioning and is highly self documenting.

Do we need to invent special syntax, or could we use common syntax and
detect specific use cases and handle them specially ?

e.g. "when a >= const1 and a < const2 ...; when a >= const2 and a < const3" - check a btree opclass exists for datatype
ofa- prove the partitions don't overlap- prove the btree order of the partitions- ... 

Andreas

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [NOVICE] Workaround for bug #4608?
Next
From: Tom Lane
Date:
Subject: Re: Automating Partitions in PostgreSQL - Query on syntax