Re: Partitionin with check functions

From: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Partitionin with check functions
Date: 2009-03-30 15:08:57
Message-ID: pu63hr3v5i.fsf@srv.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

In article <2499(dot)1238420859(at)sss(dot)pgh(dot)pa(dot)us>,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> In particular, a constraint like "sel=123" is *not* going to lead the
> planner to draw any conclusions about the value of "mod(sel,6)".
> Now, if you'd written "WHERE mod(sel,6)=3", I think it would draw
> the right conclusions.

Yes, it does. It might be worthwile to use

WHERE sel=123 AND mod(sel,6)=3

I think you could use a rule to add the mod() condition automatically.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2009-03-30 15:40:04 Re: copy command and column attribute
Previous Message toni hernández 2009-03-30 14:39:59 copy command and column attribute