Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.

Redshift normalize_timestamp - Output timestamp out of range in EXTRACT() #786

Closed
@dlawin

Description

@dlawin

Describe the bug
This method's reliance on extract epoch is causing an exception with timestamps that have relatively high or low values

e.g.
select extract(epoch from '0001-01-01 12:34:56.123456'::timestamp(6))
select extract(epoch from '4713-01-01 00:00:00.000000'::timestamp(6))

cause:

SQL Error [XX000]: ERROR: Overflow or underflow for DATEPART/EXTRACT 'epoch'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions