Re: Partitionin with check functions - Mailing list pgsql-admin

From Harald Fuchs
Subject Re: Partitionin with check functions
Date
Msg-id pu63hr3v5i.fsf@srv.protecting.net
Whole thread Raw
In response to Partitionin with check functions  (fatih ozturk <ozturkfa@yahoo.com>)
List pgsql-admin
In article <2499.1238420859@sss.pgh.pa.us>,
Tom Lane <tgl@sss.pgh.pa.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.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Partitionin with check functions
Next
From: toni hernández
Date:
Subject: copy command and column attribute