Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2023-06-12 14:54:28 +0000
committerTom Lane2023-06-12 14:54:44 +0000
commit7398e27224f173306e5b62977672b29f5553ee76 (patch)
tree2807b4b39c226a9850fb890558608c358792b6d4 /contrib/btree_gist
parent0c524370203b85b49ca3b52c7a705b867d7c7167 (diff)
Accept fractional seconds in jsonpath's datetime() method.
Commit 927d9abb6 purported to make datetime() accept any string that could be output for a datetime value by to_jsonb(). But it overlooked the possibility of fractional seconds being present, so that cases as simple as to_jsonb(now()) would defeat it. Fix by adding formats that include ".US" to the list in executeDateTimeMethod(). (Note that while this is nominally microseconds, it'll do the right thing for fractions with fewer than six digits.) In passing, re-order the list to restore the datatype ordering specified in its comment. The violation accidentally did not break anything; but the next edit might be less lucky, so add more comments. Per report from Tim Field. Back-patch to v13 where datetime() was added, like the previous patch. Discussion: https://postgr.es/m/014A028B-5CE6-4FDF-AC24-426CA6FC9CEE@mohiohio.com
Diffstat (limited to 'contrib/btree_gist')
0 files changed, 0 insertions, 0 deletions