Skip to content
This repository has been 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 opened this issue Nov 29, 2023 · 0 comments · Fixed by #787
Closed

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

dlawin opened this issue Nov 29, 2023 · 0 comments · Fixed by #787
Assignees
Labels
bug Something isn't working in-progress

Comments

@dlawin
Copy link
Contributor

dlawin commented Nov 29, 2023

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'
@dlawin dlawin added the bug Something isn't working label Nov 29, 2023
@dlawin dlawin self-assigned this Nov 29, 2023
@dlawin dlawin removed the triage label Nov 29, 2023
dlawin added a commit that referenced this issue Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working in-progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant