There seems to be incompability between VARCHAR and TEXT (at least for custom composite type).
when one uses writeString into field which declared as TEXT exception is thrown:
error: com.impossibl.postgres.jdbc.PGSQLSimpleException: wrong data type: 1043, expected 25
CREATE TYPE inventory_item AS (
name text, -- replace it with varchar and everything is good
supplier_id integer,
price numeric
);
CREATE TABLE on_hand (
item inventory_item,
count integer
);
There seems to be incompability between
VARCHAR
andTEXT
(at least for custom composite type). when one useswriteString
into field which declared asTEXT
exception is thrown:But everything works fine if
VARCHAR
is used.SQL taken from https://www.postgresql.org/docs/current/rowtypes.html