Skip to content

Postgres: Support negative scale for NUMERIC #1923

@mvzink

Description

@mvzink

When specifying explicit precision and scale for numerics, Postgres allows the ranges 0..=1000 for precision and -1000..=1000 for scale. Currently, ExactNumberInfo uses u64 to represent scale, and the parser fails on the - when trying to parse DDL with a negative scale:

create table t (x numeric(1000,-10));

Error during parsing: ParserError("Expected: literal int, found: - at Line: 1, Column: 32")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions