[jOOQ/jOOQ#14699] PostgreSQL interval parser handle fractional seconds with interval style iso_8601

This commit is contained in:
Lukas Eder 2023-02-27 09:26:02 +01:00
parent 5bce422978
commit 42e8590d9f
2 changed files with 4 additions and 5 deletions

View File

@ -95,13 +95,12 @@ public class PGInterval extends PGobject {
for (int i = 0; i < timeValue.length(); i++) {
int lookAhead = lookAhead(timeValue, i, "HMS");
if (lookAhead > 0) {
number = Integer.parseInt(timeValue.substring(i, lookAhead));
if (timeValue.charAt(lookAhead) == 'H') {
setHours(number);
setHours(Integer.parseInt(timeValue.substring(i, lookAhead)));
} else if (timeValue.charAt(lookAhead) == 'M') {
setMinutes(number);
setMinutes(Integer.parseInt(timeValue.substring(i, lookAhead)));
} else if (timeValue.charAt(lookAhead) == 'S') {
setSeconds(number);
setSeconds(Double.parseDouble(timeValue.substring(i, lookAhead)));
}
i = lookAhead;
}

View File

@ -27,7 +27,7 @@
<hsqldb.version>2.7.1</hsqldb.version>
<!-- JDBC drivers for jOOQ-xyz-extensions modules and vendor-specific API access -->
<postgres.version>42.5.3</postgres.version>
<postgres.version>42.5.4</postgres.version>
<sqlserver.version>11.2.1.jre11</sqlserver.version>
<oracle.version>21.7.0.0</oracle.version>