已关闭
[Bug]: 【资料】display_leading_zero tochar fmt为999,999.99表现结果与资料不符 #7275
lijing3007kkk创建于  8月13日关闭于  22 天前
lijing3007kkk
lijing3007kkk成员
8月13日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

测试结果与资料不符

操作系统和硬件信息

arm 2203

测试环境

企业版单机

被测功能

to char(numeric,"999,999.99")
to char(numeric,"999,999,999.99")

预置条件

操作步骤

step1 创建A库 SET behavior_compat_options = 'display_leading_zero';
step2 SELECT 'display_on' AS switch_to, '-0.50' AS val, trim(to_char(-0.50::numeric, '999,999.99')) AS fmt1, trim(to_char(-0.50::numeric, '999,999,999.99')) AS fmt2;

预期输出

        https://docs.opengauss.org/zh/docs/latest/database_reference/platform_and_client_compatibility.html#behavior_compat_options

image.png
同资料 纯小数时小数点前带0

实际输出

-.50

日志信息

image.png

提单组织

测试团队

测试代码

likedislike
lijing3007kkklijing3007kkk成员
8月13日 添加了label:bug
lijing3007kkklijing3007kkk成员
8月13日 关联了看板:openGauss 7.0.0-LTS
opengauss_botopengauss_bot成员
8月13日 添加了label:sig/Docs
opengauss_bot
opengauss_bot成员
8月13日 评论:

Welcome To openGauss Community

Hey @l3007kkk , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Docs ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Evawudonger, @fyq_lpl, @hemiao3787, @hujunjune, @hw_hbj, @lestertt, @libiao2024, @mentoswang, @sunyunyu, @tongdabao, @wangfeihuo, @zhangxubo, @zijianli16 .

likedislike
lijing3007kkklijing3007kkk成员
8月13日 修改了issue 的描述
lijing3007kkklijing3007kkk成员
8月13日 issue优先级由 无优先级 改变为 次要
Lliyangx成员
8月14日 关联了pull request:update: 平台和客户端兼容性-display_leading_zero参数说明文档,补充to_char(numeric, format)函数说明;
Lliyangx成员
8月14日 关联了pull request:update: 【7.0.0-RC3】平台和客户端兼容性-display_leading_zero参数说明文档,补充to_char(numeric, format)函数说明;
Lliyangx成员
8月14日 关联了pull request:update: 【6.0.0】平台和客户端兼容性-display_leading_zero参数说明文档,补充to_char(numeric, format)函数说明; 涉及:企业版/单机、中文/英文
Lliyangx成员
29 天前 issue状态由 待办的 改变为 已完成
liyangx成员
28 天前 评论:

20260819自验
1️⃣latest资料:
image.png

2️⃣7.0.0-RC3资料:
image.png

3️⃣6.0.0-LTS资料:
image.png

企业版/轻量版、中文/英文均已生效

likedislike
Lliyangx成员
28 天前 issue状态由 已完成 改变为 待回归
lijing3007kkk
lijing3007kkk成员
22 天前 评论:

回归结论:通过
回归版本:7.0.0-LTS b0019
回归截图:

image.png
image.png

likedislike
lijing3007kkklijing3007kkk成员
22 天前 issue状态由 待回归 改变为 已验收
lijing3007kkklijing3007kkk成员
22 天前 关闭了 issue