dbTalk Databases Forums  

[BUGS] BUG #2467: Documentation

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2467: Documentation in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [BUGS] BUG #2467: Documentation - 06-05-2006 , 05:18 AM







The following bug has been logged online:

Bug reference: 2467
Logged by: Rae Stiening
Email address: stiening (AT) stiening (DOT) com
PostgreSQL version: 8.1.4
Operating system: Linux
Description: Documentation
Details:

Table 9-3. Mathematical Functions

Description of the "width_bucket(...)"

"return the bucket to which operand would be assigned in an equidepth
histogram with count buckets, an upper bound of b1, and a lower bound of
b2"

I believe that the lower bound is b1 and upper b2.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] BUG #2467: Documentation - 06-05-2006 , 10:48 AM






"Rae Stiening" <stiening (AT) stiening (DOT) com> writes:
Quote:
Description of the "width_bucket(...)"

"return the bucket to which operand would be assigned in an equidepth
histogram with count buckets, an upper bound of b1, and a lower bound of
b2"

I believe that the lower bound is b1 and upper b2.
I agree that this is a typo, but looking at the spec and the function
code, the description seems misleading altogether. Apparently b1 > b2
is allowed and the computation is effectively negated then (the buckets
are numbered in descending rather than ascending order). So ISTM that
just switching "lower" and "upper" in the text doesn't really get us to
the point of adequately documenting the function. But the description
is already too long to fit comfortably in the table, so adding another
sentence to cover the b1 > b2 case isn't attractive.

Any ideas what to do? Would "starting bound" and "ending bound" work,
or just confuse people more?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2467: Documentation - 08-21-2006 , 08:06 PM




--ELM1156207778-24376-3_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"

Tom Lane wrote:
Quote:
"Rae Stiening" <stiening (AT) stiening (DOT) com> writes:
Description of the "width_bucket(...)"

"return the bucket to which operand would be assigned in an equidepth
histogram with count buckets, an upper bound of b1, and a lower bound of
b2"

I believe that the lower bound is b1 and upper b2.

I agree that this is a typo, but looking at the spec and the function
code, the description seems misleading altogether. Apparently b1 > b2
is allowed and the computation is effectively negated then (the buckets
are numbered in descending rather than ascending order). So ISTM that
just switching "lower" and "upper" in the text doesn't really get us to
the point of adequately documenting the function. But the description
is already too long to fit comfortably in the table, so adding another
sentence to cover the b1 > b2 case isn't attractive.

Any ideas what to do? Would "starting bound" and "ending bound" work,
or just confuse people more?
I generalized the documentation section for this function.

--
Bruce Momjian bruce (AT) momjian (DOT) us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

--ELM1156207778-24376-3_
Content-Transfer-Encoding: 7bit
Content-Type: text/x-diff
Content-Disposition: inline; filename="/bjm/diff"

Index: doc/src/sgml/func.sgml
================================================== =================
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.331
diff -c -c -r1.331 func.sgml
*** doc/src/sgml/func.sgml 21 Aug 2006 00:57:23 -0000 1.331
--- doc/src/sgml/func.sgml 22 Aug 2006 00:45:53 -0000
***************
*** 837,844 ****
<entry><type>int</type></entry>
<entry>return the bucket to which <parameter>operand</> would
be assigned in an equidepth histogram with <parameter>count</>
! buckets, an upper bound of <parameter>b1</>, and a lower bound
! of <parameter>b2</></entry>
<entry><literal>width_bucket(5.35, 0.024, 10.06, 5)</literal></entry>
<entry><literal>3</literal></entry>
</row>
--- 837,843 ----
<entry><type>int</type></entry>
<entry>return the bucket to which <parameter>operand</> would
be assigned in an equidepth histogram with <parameter>count</>
! buckets, in the range <parameter>b1</> to <parameter>b2</></entry>
<entry><literal>width_bucket(5.35, 0.024, 10.06, 5)</literal></entry>
<entry><literal>3</literal></entry>
</row>

--ELM1156207778-24376-3_
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

--ELM1156207778-24376-3_--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.