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

   > The PostgreSQL Proxy didn't set `standard_conforming_strings=on`. 
Beginning in PostgreSQL 9.1, the default of `standard_conforming_strings` is on 
(prior releases defaulted to off).
   > 
   > 
https://www.postgresql.org/docs/current/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION
   > 
   > If we add the following
   > 
   > ```java
   >         context.write(new 
PostgreSQLParameterStatusPacket("standard_conforming_strings", "on"));
   > ```
   > 
   > to
   > 
   > 
https://github.com/apache/shardingsphere/blob/a74a8f5be32a43cc5617aab1001fd97cb665e29f/proxy/frontend/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/authentication/PostgreSQLAuthenticationEngine.java#L104-L108
   > 
   > The following code could circumvent the problem like `cannot convert 
true/false to Varbit/Varchar`.
   > 
   > ```go
   >    dbURL := "postgres://postgres:postgres@localhost:55432/postgres"
   > 
   >    db, err := gorm.Open(postgres.New(postgres.Config{DSN: dbURL, 
PreferSimpleProtocol: true}), &gorm.Config{})
   > ```
   
   Hi @surukonda 
   Would you like to submit a PR to add this parameter status to Proxy?


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