Skip to content
Advertisement

Inserting image to BYTES column – type “binary” does not exist

I’m trying to insert an image from Spring’s MultipartFile field into Postgres’ BYTEA column with jOOQ but I keep getting confusing error message. What does it mean and how the insert should be done?

And when executed it gives confusing error message:

Advertisement

Answer

Your exception stack trace shows you the reason. You have configured the SQLDialect.H2 dialect, but ran your query on PostgreSQL. Use the SQLDialect.POSTGRES dialect.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement