Skip to content

Interval fractional second precision is discarded/fails to be parsed #9762

@LeonidChistov

Description

@LeonidChistov

What happens?

Consider following options to create interval value with milliseconds precision

select interval 10.123 second;
select interval '10.123' second;
select '47.210'::interval second;
select '00:00:47.210'::interval second;

Only the last option works, however for three first options we get following issues:

  • Parser Error: syntax error at or near "10.123"
  • 00:00:10 (Value is truncated)
  • Error: Conversion Error: extract specifier "" not recognized

Second option is especially desirable to work since this a standard syntax supported by many databsases (and Postgres in particular).

To Reproduce

Run queries listed above using DuckDB CLI.

OS:

Linux

DuckDB Version:

0.9.2

DuckDB Client:

cli

Full Name:

Leonid Chistov

Affiliation:

Querify Labs

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

Labels

Needs DocumentationUse for issues or PRs that require changes in the documentationreproduced

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions