Open bioball opened 8 years ago
Update: I tried switching my type to "VARCHAR(10)"
and get the same issue. I also tried just "CHAR"
, but this chops off my whole string and only inserts the first char.
@bioball yes, postgres JDBC can't find char(10)[]
. The (10)
impacted the finding.
Maybe you can try varchar[]
or text[]
.
Changing it to "VARCHAR"
worked. This seems broken to me, but I guess it doesn't matter if I represent this column as a varchar
or text
? The column in my table is still a CHAR(10)
.
Yeah, seems char(10)[]
column don't reject values char[]
/varchar[]
/text[]
.
Got same issue with interger
type. Seems like more AdvancedArrayJdbcType
related than concrete sqlBaseType
.
@ploddi you mean integer[]
not work?
I got very strange issue. Investigating it now. I implement AdvancedArrayJdbcType
for my custom type (enumuratum enumerations). On SOME integers I getting https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java#L1098 exception and other enums works just fine. Mb some slick or postgres driver related issue.
I have column whose type is
CHAR(10)[]
, and am attempting to use an AdavancedArrayJdbcType to create a mapping into a scala class.Here's how I'm creating the mapping in my source code:
However, I'm getting this error:
Looks to me like the postgres JDBC is trying to find the type that corresponds to
"CHAR(10)[]"
, and not finding any. Is this a bug? Or what should my SQL base type be? Is there something I can reference for this?