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:
Lukas Eder 2025-09-29 10:59:21 +02:00
parent b8aba7c150
commit 68f6b7e333
2 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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: