-
Notifications
You must be signed in to change notification settings - Fork 315
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
feat: support pg_namespace, pg_class and related psql command #4428
Conversation
* refactor: move memory_table::tables to utils::tables
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
@tisonkun can you take a look? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4428 +/- ##
==========================================
- Coverage 84.97% 84.60% -0.37%
==========================================
Files 1076 1081 +5
Lines 192585 192910 +325
==========================================
- Hits 163653 163219 -434
- Misses 28932 29691 +759 |
@tisonkun Let's push forward this pr to avoid extra burden to keep track with main branch. |
Great work! I'll give a review today. Thank you. |
A question or proposition: could we use a hash value of the schema name(if it is a perfect hash function, AKA no conflicts)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. LGTM.
Thanks for your contribution! Merging ... |
@J0HN50N133 Could you consider this suggestion? Using |
@killme2008
Or we can create a new metadata manager to maintain the schema id. |
I think it can work currently. The best way is to add a schema id in metadata, let's do the refactor in the future. @fengjiachun |
@killme2008 Got it. I'll implement the workaround tomorrow. |
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
#3560
What's changed and what's your intention?
!!! DO NOT LEAVE THIS BLOCK EMPTY !!!
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Add
pg_catalog.pg_namespace
andpg_catalog.pg_class
. Now we can use\d
,\dt
,\dv
and allrelated psql commands.
oid
inpg_catalog.pg_namespace
needu32
values to identifynamespace
(i.e. schema in greptime), but there is no numeric schema id. So we just useschema_name
as identifier. This workaround may introduce potential incompatibility with the existed pg eco.pg_catalog.pg_get_userbyid
always return empty string, since we don't haveUserId
to getUserInfo
.for details see: Compatible with Postgres system catalog #3560 (comment)
Checklist