Skip to content

Inconsistency with negative intervals #81577

@dvarrazzo

Description

@dvarrazzo

In PostgreSQL, these two values are considered equal, the expression returns True:

select '-1 day 23:59:59'::interval = '-1s'::interval;

In crdb they are considered different, the expression returns False, even if extract('epoch' from x) returns -1 for both.

Tested with CockroachDB CCL v21.2.10

Jira issue: CRDB-15091

Epic: CRDB-20062

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tools-psycopgC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    Status

    Bugs to Fix

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions