Skip to content

SQL: TIME and DATE types metadata attributes corrections #41086

Closed
@bpintea

Description

@bpintea

The values returned by SYS TYPES for the time data types needs adjusting for the following attributes: MINIMUM_SCALE, MAXIMUM_SCALE and SQL_DATETIME_SUB as follows:

  • the DATE and TIME must have the values swapped for MINIMUM_SCALE and MAXIMUM_SCALE attributes (since DATE has no seconds component);
  • SQL_DATETIME_SUB must have these subcode values:
    • for DATE: 1;
    • for TIME: 2.

Current values (for convenience):

        TYPE_NAME        |   DATA_TYPE   |   PRECISION   |LITERAL_PREFIX |LITERAL_SUFFIX | CREATE_PARAMS |   NULLABLE    |CASE_SENSITIVE |  SEARCHABLE   |UNSIGNED_ATTRIBUTE|FIXED_PREC_SCALE|AUTO_INCREMENT |LOCAL_TYPE_NAME| MINIMUM_SCALE | MAXIMUM_SCALE | SQL_DATA_TYPE |SQL_DATETIME_SUB|NUM_PREC_RADIX |INTERVAL_PRECISION
-------------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+------------------+----------------+---------------+---------------+---------------+---------------+---------------+----------------+---------------+------------------
DATE                     |91             |29             |'              |'              |null           |2              |false          |3              |true              |false           |false          |null           |3              |3              |91             |0               |null           |null              
TIME                     |92             |18             |'              |'              |null           |2              |false          |3              |true              |false           |false          |null           |null           |null           |92             |0               |null           |null              
DATETIME                 |93             |29             |'              |'              |null           |2              |false          |3              |true              |false           |false          |null           |3              |3              |9              |3               |null           |null              

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions