---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - >-
    en/troubleshooting/errors/ERR-DS_API-DB-INVALID_FUNCTION-PG_DOUBLE_PRECISION_ROUND
  - >-
    ru/troubleshooting/errors/ERR-DS_API-DB-INVALID_FUNCTION-PG_DOUBLE_PRECISION_ROUND
  - href: >-
      en/troubleshooting/errors/ERR-DS_API-DB-INVALID_FUNCTION-PG_DOUBLE_PRECISION_ROUND.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: >-
  en/troubleshooting/errors/ERR-DS_API-DB-INVALID_FUNCTION-PG_DOUBLE_PRECISION_ROUND.html
title: >-
  DataLens On-premises error
  ERR.DS_API.DB.INVALID_FUNCTION.PG_DOUBLE_PRECISION_ROUND
description: >-
  This page describes the ROUND with precision parameter is not supported for
  double precision data type in PostgreSQL DataLens On-premises error.
vcsPath: >-
  en/troubleshooting/errors/ERR-DS_API-DB-INVALID_FUNCTION-PG_DOUBLE_PRECISION_ROUND.md
---

# [DataLens On-premises] ROUND with precision parameter is not supported for double precision data type in PostgreSQL

`ERR.DS_API.DB.INVALID_FUNCTION.PG_DOUBLE_PRECISION_ROUND`

The [ROUND](../..//function-ref/ROUND.md) function with the `precision` parameter is not supported for the `double precision` type of PostgreSQL data source.

DataLens recognizes PostgreSQL's `double precision` and `numeric` types as a `Fractional number`. Out of these two types, the ROUND function with the `precision` parameter only supports `numeric`. To get `double precision` back to the database level, use another function: [DB_CAST](../..//function-ref/DB_CAST.md).

Here is an example:

```
ROUND(DB_CAST([your field]/1000000, 'numeric', 16, 8) [, precision ]), where 16 is the total number of digits in the fractional number, and 8 is its count of decimal places.
```
