Re: On partitioning

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On partitioning
Date: 2014-12-17 01:13:16
Message-ID: 5490D8AC.90901@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17-12-2014 AM 12:15, Robert Haas wrote:
> On Mon, Dec 15, 2014 at 6:55 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> Robert wrote:
>>> I would expect that to fail, just as it would fail if you tried to
>>> build an index using a volatile expression.
>>
>> Oops, wrong example, sorry. In case of an otherwise good expression?
>
> I'm not really sure what you are getting here. An "otherwise-good
> expression" basically means a constant. Index expressions have to be
> things that always produce the same result given the same input,
> because otherwise you might get a different result when searching the
> index than you did when building it, and then you would fail to find
> keys that are actually present. In the same way, partition boundaries
> also need to be constants. Maybe you could allow expressions that can
> be constant-folded, but that's about it.

Yeah, this is what I meant. Expressions that can be constant-folded.
Sorry, the example I chose was pretty lame. I was just thinking about
kind of stuff that something like pg_node_tree would be a good choice
for as on-disk representation of partition values. Though definitely it
wouldn't be to store arbitrary expressions that evaluate to different
values at different times.

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2014-12-17 01:42:09 Re: On partitioning
Previous Message David G Johnston 2014-12-17 01:13:08 Re: POLA violation with \c service=