appsmithorg / appsmithorg/appsmith

[Feature] In a Postgres datasource, allow choosing a specific schema, and/or only display accessible tables

Đang mở
#8,101 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
Community Reported Enhancement Integrations Product Low effort Postgres Query & JS Pod Query Widgets & IDE Pod
Ngôn ngữ chính
TypeScript
Star
40.9k
Fork
4.8k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
45

Mô tả

## Summary

In a Postgres datasource, Instead of automatically querying pg_catalog for all tables/schemas, allow for a specific "schema" to be chosen, with the default being "public".

## Motivation

Currently, when choosing a Postgres database with many schemas besides "public", *all* the tables from *all* schemas are displayed in left panel, whether the database user has access to them or not. (This is a quirk of Postgres, that querying the pg_catalog table shows all schemas and tables whether privileges have been granted or not.)

## Additional Context

#There are two approaches, I've seen to this problem, ideally both may be implemented.
1. add a Schema field to the form where datasource is setup. Default is "public".
2. Metabase handles this beautifully, when adding a datasource, they query the privileges to only display tables that the database user has access to. It would be great if Appsmith could do this as well.
-------
Attached is a screenshot of the current result of adding a database with many schemas.

![Screenshot from 2021-09-30 21-19-38](https://user-images.githubusercontent.com/15368570/135683311-a44af886-3874-4a96-8d25-d071783860e7.png)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.