Skip to content

oracle模式下,字段长度不兼容 #561

@shawn0915

Description

@shawn0915

Bug Report

IvorySQL Version

IvorySQL 3.0 BETA

OS Version (uname -a)

Configuration options ( config.status --config )

Current Behavior

  • char

ivorysql,可以创建表,并定义字段为char(2001)

ivorysql=# \parser
Oracle parser.
ivorysql=# create table t_char(a char(1), b char(2000), c char(2001));
CREATE TABLE

但是在oracle报错

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 30 00:00:19 2022
Version 19.6.0.0.0

00:03:06 localhost:SQL>create table t_char(a char(1), b char(2000), c char(2001));
create table t_char(a char(1), b char(2000), c char(2001))
                                                    *
ERROR at line 1:
ORA-00910: specified length too long for its datatype
  • timestamp

ivorysql,创建表,并定义字段为timestamp(9)时,报warning

ivorysql=# \parser
Oracle parser.
ivorysql=# create table t_timestamp(a timestamp, b timestamp(0), c timestamp(6), d timestamp(9));
WARNING:  TIMESTAMP(9) effective number of fractional seconds is 6,the part of excess is 0
LINE 1: ...mp(a timestamp, b timestamp(0), c timestamp(6), d timestamp(...
                                                             ^
WARNING:  TIMESTAMP(9) effective number of fractional seconds is 6,the part of excess is 0
CREATE TABLE
ivorysql=#

但是在oracle可以正常创建

00:02:49 localhost:SQL>create table t_timestamp(a timestamp, b timestamp(0), c timestamp(6), d timestamp(9));

Table created.

Expected behavior/code

Step to reproduce

Additional context that can be helpful for identifying the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions