RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Taral <taral@mail.utexas.edu>
From: "Taral" <taral@mail.utexas.edu>
To: "Bruce Momjian" <maillist@candle.pha.pa.us>
Cc: <jwieck@debis.com>, <hackers@postgreSQL.org>
Date: 1998-10-04T02:26:20Z
Lists: pgsql-hackers, pgsql-general
> however if A and C are identical, this could become: > > (A OR A) AND (A OR D) AND (B OR A) AND (B OR D) > > and A OR A is A: > > A AND (A OR D) AND (B OR A) AND (B OR D) > > and since we are now saying A has to be true, we can remove OR's with A: > > A AND (B OR D) Very nice... and you could do that after each iteration of the rewrite, preventing the size from getting too big. :) I have a symbolic expression tree evaluator that would be perfect for this... I'll see if I can't adapt it. Can someone mail me the structures for expression trees? I don't want to have to excise them from the source. Please? Taral