In article <2499.1238420859@xxxxxxxxxxxxx>, Tom Lane <tgl@xxxxxxxxxxxxx> 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. -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin