I have a function which maps java to SQL types. As I want to store binary data, is there any type defined by the SQL standard which I can use both in PostgreSQL and hsqldb?
The SQL 92 standard does not define a binary type. PostgreSQL has a bytea
type, hsqldb has a binary
type.
For a very portable (if not efficient) solution, convert the binary to base64, and store it in a string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With