You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use nanosecond as a part with date_part results in an error. The documentation says it should work.
To Reproduce
Call the date_part function with the part specified as 'nanosecond'. e.g: (fiddle)
SELECT date_part('nanosecond', now());
Expected behavior
The result to be the number of seconds (including any fractional part * 1_000_000_000.
Additional context
To support this date_part() will have to return an Int64, rather than an Int32 if the part is 'nanosecond'. It already has special handling for 'epoch', so I can't see this being a problem.
Activity
mhilton commentedon Mar 3, 2026
take
feat: support nanosecond date_part (#20674)
feat: support nanosecond date_part (apache#20674)