Getting nearly double the length when reading byte[] from postgres with jpa

后端 未结 5 748
夕颜
夕颜 2021-01-06 11:50

I have an Image class that has a byte[] to contain the actual image data. I\'m able to upload and insert the image just fine in my webapp. When I attempt to display the im

5条回答
  •  既然无缘
    2021-01-06 12:34

    The "bytea_output = escape" is just a workaround, Postgres 8.0 changed the bytea encoding to hex.

    Use a current JDBC driver since 9.0-dev800 (9.0 Build 801 is up-to-date currently) and the problem will be solved.

提交回复
热议问题