TeslaCN commented on issue #23776:
URL: 
https://github.com/apache/shardingsphere/issues/23776#issuecomment-1407360074

   Use the bytea instead of jsonb
   
   ```java
   try (Statement statement = connection.createStatement()) {
       statement.executeUpdate("drop table if exists bytea_pg");
       statement.executeUpdate("create table bytea_pg (val_bytea bytea not 
null)");
   }
   try (PreparedStatement preparedStatement = 
connection.prepareStatement("insert into bytea_pg values (?) returning *")) {
       preparedStatement.setBytes(1, 
"{\"test\":\"test\"}".getBytes(StandardCharsets.UTF_8));
       try (ResultSet resultSet = preparedStatement.executeQuery()) {
           resultSet.next();
           System.out.println(Arrays.toString(resultSet.getBytes(1)));
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to