Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对日期格式,各部分 位数校验均存在问题 #434

Closed
tanyang-star opened this issue Aug 14, 2023 · 1 comment
Closed

对日期格式,各部分 位数校验均存在问题 #434

tanyang-star opened this issue Aug 14, 2023 · 1 comment
Assignees
Labels
3.0 bug Something isn't working Community Community Supported Feature

Comments

@tanyang-star
Copy link
Collaborator

Bug Report

对日期格式,各部分 位数校验均存在问题
MM月份位数校验有误

2022-0823-19 11.11.11、2022-082323-19 11.11.11该两个值在oracle中均插入失败,PG也插入失败

IvorySQL Version

IvorySQL master

OS Version (uname -a)

CentOS 7

Current Behavior

timestamp类型:
1.alter session set NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24.MI.SS.FF';
2.create table ts_tb(a timestamp);
3.insert into ts_tb values('2022-0823-19 11.11.11'); 插入成功,查询数据为2022-08-23 19:11:11.110000
4.insert into ts_tb values('2022-082323-19 11.11.11'); 插入失败

timestamp with time zone类型:
1.alter session set NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24.MI.SS.FF TZH:TZM';
2.create table tswtz_tb(a timestamp with time zone);
3.insert into tswtz_tb values('2022-0823-19 11.11.11'); 插入成功,查询数据为2022-08-23 19.11.11.110000 08:00
4.insert into tswtz_tb values('2022-082323-19 11.11.11'); 插入成功,查询数据为 2022-08-23 20.19.11.110000 08:00

同理DD天位数校验,YYYY年分位数校验,HH/MI/SS位数校验有误 时分秒校验皆有误

Expected behavior/code

应该进行有效性校验

@tanyang-star tanyang-star added bug Something isn't working 3.0 Community Community Supported Feature labels Aug 14, 2023
@DutMsn DutMsn self-assigned this Aug 21, 2023
DutMsn added a commit to DutMsn/IvorySQL that referenced this issue Aug 23, 2023
@DutMsn
Copy link
Contributor

DutMsn commented Aug 23, 2023

#459

tanyang-star added a commit that referenced this issue Aug 29, 2023
@DutMsn DutMsn closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 bug Something isn't working Community Community Supported Feature
Projects
No open projects
Development

No branches or pull requests

2 participants