Обсуждение: Wrong example

Поиск
Список
Период
Сортировка

Wrong example

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/7.1/static/functions-math.html
Description:

The last row of table Table 4-4. Mathematical Functions seems to be wrong at
example column, current value

trunc(numeric, s integer)    numeric    truncate to s decimal
places    round(42.4382, 2)    42.43

Possible solution

trunc(numeric, s integer)    numeric    truncate to s decimal
places    trunc(42.4382, 2)    42.43

Re: Wrong example

От
Bruce Momjian
Дата:
On Fri, Apr 27, 2018 at 04:55:03AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/7.1/static/functions-math.html
> Description:
> 
> The last row of table Table 4-4. Mathematical Functions seems to be wrong at
> example column, current value
> 
> trunc(numeric, s integer)    numeric    truncate to s decimal
> places    round(42.4382, 2)    42.43
> 
> Possible solution
> 
> trunc(numeric, s integer)    numeric    truncate to s decimal
> places    trunc(42.4382, 2)    42.43

Uh, Postgres 7.1 is _decades_ old and will not be fixed.  I suggest you
look at the Postgres 10 docs.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Re: Wrong example

От
Elvis de Freitas
Дата:
Ok, I'll take a look. 

On Fri, Apr 27, 2018, 10:31 Bruce Momjian <bruce@momjian.us> wrote:
On Fri, Apr 27, 2018 at 04:55:03AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/7.1/static/functions-math.html
> Description:
>
> The last row of table Table 4-4. Mathematical Functions seems to be wrong at
> example column, current value
>
> trunc(numeric, s integer)     numeric truncate to s decimal
> places        round(42.4382, 2)       42.43
>
> Possible solution
>
> trunc(numeric, s integer)     numeric truncate to s decimal
> places        trunc(42.4382, 2)       42.43

Uh, Postgres 7.1 is _decades_ old and will not be fixed.  I suggest you
look at the Postgres 10 docs.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +