adamsaghy commented on code in PR #3385:
URL: https://github.com/apache/fineract/pull/3385#discussion_r1301352997
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/PostgreSQLQueryService.java:
##########
@@ -54,8 +54,10 @@ public boolean isTablePresent(DataSource dataSource, String
tableName) {
@Override
public SqlRowSet getTableColumns(DataSource dataSource, String tableName) {
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
- String sql = "SELECT attname AS COLUMN_NAME, not attnotnull AS
IS_NULLABLE, atttypid::regtype AS DATATYPE, attlen AS
CHARACTER_MAXIMUM_LENGTH, attnum = 1 AS COLUMN_KEY FROM pg_attribute WHERE
attrelid = '\""
- + tableName + "\"'::regclass AND attnum > 0 AND NOT
attisdropped ORDER BY attnum";
+ String sql = "SELECT column_name, is_nullable, data_type,"
Review Comment:
I think fetching from `information_schema.columns` is way slower than the
pg_attribute. Is there a way to keep the logic to fetching from pg_attribute?
--
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]