Comparing date strings with jsonpath expression
Tim Field <tim@mohiohio.com>
From: Tim Field <tim@mohiohio.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2023-05-26T01:36:14Z
Lists: pgsql-bugs
When using .datetime() in jsonpath expressions JSON encoded dates are not parsed, this is coupled with the fact that an error isn’t reported. I would expect that any date encoded via JSON.stringify() would be parseable in these JSON path functions as that is after all the format that dates are very likely to be in. If I JSON encode a date I get a value such as "2023-05-22T03:09:37.825Z” .datetime() fails to parse this due to the mircosends and timezone indicator, yet its possible to convert that with "2023-05-22T03:09:37.825Z”::timestamptz Example here of the issue, and a stackoverflow post with further discussion. https://dbfiddle.uk/PzW0WOvV https://stackoverflow.com/questions/76319993/comparing-date-strings-with-jsonpath-expression Comparing date strings with jsonpath expression stackoverflow.com
Commits
-
Accept fractional seconds in jsonpath's datetime() method.
- 7398e27224f1 16.0 landed
- bd590d1fea1b 15.4 landed
- 6f23b5f74f5f 13.12 landed
- 5eaa05f63717 14.9 landed
-
Support for ISO 8601 in the jsonpath .datetime() method
- 927d9abb6538 14.0 cited