pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: bhagyashreesalunkhe25@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Round(DP Or numeric ) returns integer
Date: Thu, 31 Jan 2019 09:50:04 -0500
Message-ID: <2262.1548946204@sss.pgh.pa.us> (raw)
In-Reply-To: <154892491574.1302.16555048036514019478@wrigleys.postgresql.org>
References: <154892491574.1302.16555048036514019478@wrigleys.postgresql.org>

PG Doc comments form <noreply@postgresql.org> writes:
> 1) The function round( dp or numeric ) always has return type integer not
> same as our parameter is.
> 2) The function round( dp or numeric, sĀ int ) returns the same type as our
> parameter is not an integer type.

Huh?

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

The description in the docs matches reality AFAICS.

			regards, tom lane




view thread (2+ messages)

Message-ID: <2262.1548946204@sss.pgh.pa.us>
Permalink:  ../2262.1548946204@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2262.1548946204@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bhagyashreesalunkhe25@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Round(DP Or numeric ) returns integer
  In-Reply-To: <2262.1548946204@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox