RaigorJiang commented on issue #32857:
URL: 
https://github.com/apache/shardingsphere/issues/32857#issuecomment-2350937413

   1. From pg  metadata, the data type of bool and bit are all `-7`
   <img width="1143" alt="image" 
src="https://github.com/user-attachments/assets/131cc2ae-231c-420e-b03a-efc312634db4";>
   
   2. Then the dataType in built ColumnMetaData is `-7` of bool
   <img width="864" alt="image" 
src="https://github.com/user-attachments/assets/60b66987-82d4-47bd-a0fc-78b6d5bcc3e4";>
   
   3. When describe for insert, executor will get the JDBC type of column
   <img width="1560" alt="image" 
src="https://github.com/user-attachments/assets/d3511877-0af3-49d7-a933-e3b434b8d187";>
   
   4. The JDBC type of `-7` is `BIT`, which 
   <img width="738" alt="image" 
src="https://github.com/user-attachments/assets/6cd1d341-2d13-44d3-88f1-76484e8ed0db";>
   
   ---
   
   <img width="1138" alt="image" 
src="https://github.com/user-attachments/assets/48591e3a-32a0-4efd-b53b-298143ef5869";>
   
   5. The value of BIT for PostgreSQL is `1560`
   <img width="797" alt="image" 
src="https://github.com/user-attachments/assets/934245b4-0ad1-4802-bd26-02e3b7b47971";>
   
   6. But actually the column type is boolean, it should be BOOL: `16`
   <img width="764" alt="image" 
src="https://github.com/user-attachments/assets/b4fc6cd0-3db7-42db-9669-00cf78335c68";>
   
   


-- 
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