Skip to content

INTERVAL literal with duplicated interval types should raise error #3183

@waitingkuo

Description

@waitingkuo

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

select interval '1 second 1 second';
+------------------------------------------------+
| IntervalDayTime("2000")                        |
+------------------------------------------------+
| 0 years 0 mons 0 days 0 hours 0 mins 2.00 secs |
+------------------------------------------------+
1 row in set. Query took 0.000 seconds.

note that it's not allowed in postgrseql

willy=# select interval '1 second 1 second';
ERROR:  invalid input syntax for type interval: "1 second 1 second"
LINE 1: select interval '1 second 1 second';

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions