[jOOQ/jOOQ#18742] Fix regression
PostgreSQL text[] types are reported to have a COLUMN_SIZE of 2147483647 by the pgjdbc driver, which we should ignore. Ignoring a length of 0 currently didn't work, though.
This commit is contained in:
parent
b8aba7c150
commit
68f6b7e333
@ -469,6 +469,11 @@ implements
|
||||
}
|
||||
|
||||
final AbstractDataType<T> length0(Integer l) {
|
||||
|
||||
// [#18742] There are no zero length strings or binary strings in SQL
|
||||
if (l != null && l == 0)
|
||||
l = null;
|
||||
|
||||
if (eq(length0(), l))
|
||||
return this;
|
||||
else
|
||||
|
||||
@ -1695,6 +1695,17 @@ final class MetaImpl extends AbstractMeta {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case POSTGRES:
|
||||
case YUGABYTEDB:
|
||||
|
||||
// [#18742] The pgjdbc driver reports a meaningless TEXT[] length.
|
||||
if (precision == Integer.MAX_VALUE && "_text".equals(typeName))
|
||||
precision = 0;
|
||||
|
||||
break;
|
||||
|
||||
// [#17284] Computed columns are reported as defaults
|
||||
case DERBY:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user