Re: order of clauses - Mailing list pgsql-general

From Steve Wolfe
Subject Re: order of clauses
Date
Msg-id 00b701c09854$7c76a900$50824e40@iboats.com
Whole thread Raw
In response to order of clauses  (Patrick Welche <prlw1@newn.cam.ac.uk>)
List pgsql-general
> > will give a divide by zero error as A=(y>0) and B=(x/y>1) can be
evaluated in
> > any order (A and B = B and A). I obviously would like (y>0) to happen
first,
> > but I don't see how this can be achieved.. Any ideas?

  I have one idea that would be nifty to implement.  In some compilers, you
can turn off complete boolean checking.  As soon as any part of an
expression will invalidate the expression, it stops evaluating all of it.
That can help you avoid division by zero, and keeps you from evaluating
parts of the expression that don't matter.  It sounds like a good idea, at
least to an ignoramus like me. : )

steve



pgsql-general by date:

Previous
From: "Gregory Wood"
Date:
Subject: Re: Postgres slowdown on large table joins
Next
From: Neil Conway
Date:
Subject: Re: Number of Connections