1

My function call takes some input, and throws it into a database. Usually, it's integers, but today, I need it to throw in a unix timestamp.

This overflew the FLOAT type, but works with type DOUBLE.

Is there anything I should be worried about by saving that 10-digit integer in type DOUBLE?

Julian H. Lam
  • 25,501
  • 13
  • 46
  • 73

1 Answers1

2

The total precision of a DOUBLE PRECISION value is approximately 16 decimal digits, so you should not worry, even if you store milliseconds or microseconds.

Marco Mariani
  • 13,556
  • 6
  • 39
  • 55