You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "oneby-wang (via GitHub)" <gi...@apache.org> on 2026/05/17 14:29:23 UTC

Re: [I] ShardingSphere proxy cannot recognize the datcompatibility field in the pg_database table when connecting using PostgreSQL JDBC [shardingsphere]

oneby-wang commented on issue #38651:
URL: https://github.com/apache/shardingsphere/issues/38651#issuecomment-4470992899

   Hi, I reproduced your issue. It looks like you are using an openGauss database rather than a standard PostgreSQL database.
   
   The column `datcompatibility` appears to be an openGauss-specific extension field in `pg_database`; it is not part of the standard PostgreSQL `pg_database` catalog table.
   
   After checking the code, I found that if `global.yaml` is configured as:
   
   ```yaml
   props:
     proxy-default-port: 3309
     proxy-frontend-database-protocol-type: PostgreSQL
   ```
   
   ShardingSphere-Proxy treats the frontend protocol as standard PostgreSQL. In that case, the system catalog metadata used during SQL binding is based on PostgreSQL semantics, so pg_database.datcompatibility is not recognized and the query may fail with Unknown column 'datcompatibility' in 'field list'.
   
   To use openGauss-specific catalog fields, please configure the proxy frontend protocol as openGauss instead:
   
   ```yaml
   props:
     proxy-default-port: 3309
     proxy-frontend-database-protocol-type: openGauss
   ```
   
   With the openGauss frontend protocol, ShardingSphere will use openGauss-specific system catalog metadata, including pg_database.datcompatibility.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org