Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL timestamp deserialisation loses millisecond precision, when timestamp is contained in an array of composite types #5193

Closed
lukaseder opened this issue Apr 6, 2016 · 0 comments

Comments

@lukaseder
Copy link
Member

Fetching from this function incurs in a loss of precision in the parsed timestamp:

CREATE OR REPLACE FUNCTION f5193(u OUT u_5193[])
AS $$
  SELECT ARRAY[
    ROW(1, timestamp '2000-01-02 03:04:05.067890'),
    ROW(2, timestamp '2000-02-02 02:02:02.222222')
  ]::u_5193[]
$$ LANGUAGE sql;
/

This is because internally, a SimpleDateFormat is used, without support for fractional seconds.


See: http://stackoverflow.com/q/36413530/521799

@lukaseder lukaseder added this to the Version 3.8.0 milestone Apr 6, 2016
lukaseder added a commit that referenced this issue Apr 6, 2016
…ion, when timestamp is contained in an array of composite types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant