Skip to content

Support float arguments to to_timestamp function #7868

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

In #7844 we are (about to) change to_timestamp to be aligned with postgres by taking seconds instead of milliseconds.

To fully align with postgres, we should also add support double (Float64) arguments as well

The postgres documentation for to_timestamp is here

Describe the solution you'd like

I would like the to_timestamp function to also support Float64 point arguments:

For example, (not the 1.1 at the end of the timestamp)

willy=# select to_timestamp(1.1);
       to_timestamp       
--------------------------
 1970-01-01 08:00:01.1+08

Describe alternatives you've considered

No response

Additional context

Note the string / two argument version of to_timestamp is covered by #5398

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions