Re: R: round(x) function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)" <mauro(dot)gaietti(at)guests(dot)selexgalileo(dot)com>
Cc: "Justin Graf" <justin(at)magwerks(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: R: round(x) function
Date: 2010-03-26 20:33:59
Message-ID: 20164.1269635639@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)" <mauro(dot)gaietti(at)guests(dot)selexgalileo(dot)com> writes:
> I think this is not consistent with documentation that says there is
> just one round function, with one argument of numeric type.

The documentation you're quoting says there is just one round function
that takes *two* arguments. Which is true:

regression=# \df round
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+-------+------------------+---------------------+--------
pg_catalog | round | double precision | double precision | normal
pg_catalog | round | numeric | numeric | normal
pg_catalog | round | numeric | numeric, integer | normal
(3 rows)

I don't think there's a claim anywhere that the numeric and double
precision versions of round(x) act identically. They hardly could be
exactly identical anyway given the different properties of the two
datatypes.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bryan Murphy 2010-03-26 20:38:02 Re: Warm Standby Setup Documentation
Previous Message Merlin Moncure 2010-03-26 19:50:26 Re: Solid State Drives with PG