Skip site navigation (1) Skip section navigation (2)

Re: Minor mathematical error in documentation

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Minor mathematical error in documentation
Date: 2008-01-18 08:59:42
Message-ID: 47906A7E.6050007@pws.com.au (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane wrote:
> Russell Smith <mr-russ(at)pws(dot)com(dot)au> writes:
>   
>> In-equality transformations do not guarantee that y > 1.5x == y/x > 
>> 1.5.  This is only true for x>0, y < 1.5*x for x<0.  I have not posted a 
>> patch as I'm not sure what is the best way to change the example.
>>     
>
> Seems a bit nit-picky, but we could change the example to
>   
I would agree, it's nit-picky.  But lots of people rely on the truth of 
the documentation.  People say I have any y/x > z situation, PostgreSQL 
manual says it works better if I do y > z*x.  So they do it, no 
questions asked. Which is the real fear from my point of view.
> SELECT ... WHERE x > 0 AND y/x > 1.5;
> becomes
> SELECT ... WHERE CASE WHEN x > 0 THEN y/x > 1.5 ELSE false END;
>
> 			regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>
>   


In response to

pgsql-bugs by date

Next:From: sharvariDate: 2008-01-18 10:14:46
Subject: BUG #3885: cant create database
Previous:From: Tom LaneDate: 2008-01-18 01:19:53
Subject: Re: BUG #3883: Autovacuum deadlock with truncate?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group