

 Amazon Redshift는 패치 198부터 새 Python UDF 생성을 더 이상 지원하지 않습니다. 기존 Python UDF는 2026년 6월 30일까지 계속 작동합니다. 자세한 내용은 [블로그 게시물](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)을 참조하세요.

# enable\_numeric\_rounding
<a name="r_enable_numeric_rounding"></a>

## 값(기본값은 굵은 글꼴로 표시)
<a name="r_enable_numeric_rounding-values"></a>

on(참), **off(거짓)**

## Description
<a name="r_enable_numeric_rounding-description"></a>

숫자 반올림 사용 여부를 지정합니다. `enable_numeric_rounding`이 `on`인 경우 Amazon Redshift는 NUMERIC 값을 INTEGER 또는 DECIMAL과 같은 다른 숫자 유형으로 변환할 때 해당 값을 반올림합니다. `enable_numeric_rounding`이 `off`인 경우 Amazon Redshift는 NUMERIC 값을 다른 숫자 유형으로 변환할 때 해당 값을 자릅니다. 숫자 유형에 대한 자세한 내용은 [숫자형](r_Numeric_types201.md) 섹션을 참조하세요.

## 예제
<a name="r_enable_numeric_rounding-example"></a>

```
--Create a table and insert the numeric value 1.5 into it.
CREATE TABLE t (a numeric(10, 2));

INSERT INTO t VALUES (1.5);

SET enable_numeric_rounding to ON;
--Amazon Redshift now rounds NUMERIC values when casting to other numeric types.

SELECT a::int FROM t;

 a
---
 2
(1 row)


SELECT a::decimal(10, 0) FROM t;

 a
---
 2
(1 row)


 SELECT a::decimal(10, 5) FROM t;
 
    a
---------
 1.50000
(1 row)


SET enable_numeric_rounding to OFF;
--Amazon Redshift now truncates NUMERIC values when casting to other numeric types.

SELECT a::int FROM t;

 a
---
 1
(1 row)


SELECT a::decimal(10, 0) FROM t;

 a
---
 1
(1 row)


SELECT a::decimal(10, 5) FROM t;

    a
---------
 1.50000
(1 row)
```