Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pg_catalog schema visible only when client connect from Postgres protocol #4543

Closed
sunng87 opened this issue Aug 12, 2024 · 1 comment · Fixed by #4580
Closed

Make pg_catalog schema visible only when client connect from Postgres protocol #4543

sunng87 opened this issue Aug 12, 2024 · 1 comment · Fixed by #4580
Labels
C-enhancement Category Enhancements

Comments

@sunng87
Copy link
Member

sunng87 commented Aug 12, 2024

What type of enhancement is this?

API improvement

What does the enhancement do?

This was a comment from the initial PR of pg_catalog feature #4332 . This pg_catalog is designed to work with postgresql client tools like psql to get meta information of the database. It should only be visible when client connects from postgresql protocol. We should not see it from our mysql clients, and http dashbaord.

Implementation challenges

Check the QueryContext to see current whether current client is from postgresql port or not.

@sunng87 sunng87 added the C-enhancement Category Enhancements label Aug 12, 2024
@J0HN50N133
Copy link
Contributor

assign this to me.

J0HN50N133 added a commit to J0HN50N133/greptimedb that referenced this issue Aug 17, 2024
J0HN50N133 added a commit to J0HN50N133/greptimedb that referenced this issue Aug 25, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 9, 2024
* fix: table resolving logic related to pg_catalog

refer to
#3560 (comment)
and #4543

* refactor: remove CatalogProtocol type

* fix: sqlness

* fix: forbid create database pg_catalog with mysql client

* refactor: use QueryContext as arguments rather than Channel

* refactor: pass None as default behaviour in information_schema

* test: fix test
CookiePieWw pushed a commit to CookiePieWw/greptimedb that referenced this issue Sep 17, 2024
* fix: table resolving logic related to pg_catalog

refer to
GreptimeTeam#3560 (comment)
and GreptimeTeam#4543

* refactor: remove CatalogProtocol type

* fix: sqlness

* fix: forbid create database pg_catalog with mysql client

* refactor: use QueryContext as arguments rather than Channel

* refactor: pass None as default behaviour in information_schema

* test: fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants