Apache Cloudberry version
cloudberry: Latest
jdbc--42.7.5
What happened
import java.sql.*;
public class JdbcTest {
public static void main(String[] args) {
/* create table tab_jdbc_metadata (a numeric(38,4) not null, b int not null); */
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/gpadmin", "gpadmin", "gpadmin")) {
System.out.println("Connected to PostgreSQL database!");
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("SELECT * FROM tab_jdbc_metadata WHERE 1=0");
ResultSetMetaData metaData = resultSet.getMetaData();
int ncolumns = metaData.getColumnCount();
for (int i = 1; i <= ncolumns; i++) {
System.out.println("Column name: " + metaData.getColumnName(i) +
", Precision: " +metaData.getPrecision(i) +
", Scale: " + metaData.getScale(i) +
", Nullable: " + metaData.isNullable(i));
}
} catch (Exception e) {
System.out.println("Connection failure.");
e.printStackTrace();
}
}
}
expected result is :
Column name: a, Precision: 38, Scale: 4, Nullable: 0
Column name: b, Precision: 10, Scale: 0, Nullable: 0
but result is in cloudberry is :
Column name: a, Precision: 38, Scale: 4, Nullable: 2
Column name: b, Precision: 10, Scale: 0, Nullable: 2
### What you think should happen instead
_No response_
### How to reproduce
see above
### Operating System
centos7/macos
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes, I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md).
Apache Cloudberry version
cloudberry: Latest
jdbc--42.7.5
What happened
expected result is :
but result is in cloudberry is :