Re: Partitions not Working as Expected - Mailing list pgsql-performance

From bricklen
Subject Re: Partitions not Working as Expected
Date
Msg-id CAGrpgQ_3pCLt3CJnap3z+nWe3-Q=A3sMH7OKP0sUeo79kViD8w@mail.gmail.com
Whole thread Raw
In response to Re: Partitions not Working as Expected  (Shaun Thomas <sthomas@optionshouse.com>)
Responses Re: Partitions not Working as Expected  (Dave Johansen <davejohansen@gmail.com>)
List pgsql-performance
On Thu, Jun 27, 2013 at 10:17 AM, Shaun Thomas <sthomas@optionshouse.com> wrote:

Well yeah. That's not really the point, though. Aside from existing code, hard-coding is generally frowned upon. Our devs have been using CURRENT_DATE and its ilk for over six years now.

Would it help to put the current_date call in a wrapper function and coerce it as IMMUTABLE? A quick test shows that constraint exclusion seems to kick in, but I can't speak intelligently about whether that is wise or not.

pgsql-performance by date:

Previous
From: Shaun Thomas
Date:
Subject: Re: Partitions not Working as Expected
Next
From: Dave Johansen
Date:
Subject: Re: Partitions not Working as Expected