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

feat: support set database of the current session #19786

Merged
merged 7 commits into from
Dec 30, 2024

Conversation

yezizp2012
Copy link
Member

@yezizp2012 yezizp2012 commented Dec 12, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Resolve #19770 .

dev=> create database d1;
CREATE_DATABASE
dev=> use d1;
NOTICE:  You are now connected to database "d1" as user "root".
USE
dev=> set database to dev;
NOTICE:  You are now connected to database "dev" as user "root".
SET_VARIABLE
dev=> set search_path to "public";
SET_VARIABLE
dev=> show search_path;
  Name
--------
 public
(1 row)

dev=> set database to dev;
NOTICE:  You are now connected to database "dev" as user "root".
SET_VARIABLE
dev=> show search_path;
      Name
-----------------
 "$user", public
(1 row)

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

Support SET DATABASE TO <database_name> and USE <database_name> . Enable switching databases during an active session.

@yezizp2012 yezizp2012 marked this pull request as ready for review December 24, 2024 08:27
@yezizp2012 yezizp2012 requested a review from st1page December 24, 2024 08:27
@yezizp2012 yezizp2012 enabled auto-merge December 25, 2024 05:44
@yezizp2012 yezizp2012 added this pull request to the merge queue Dec 30, 2024
Merged via the queue into main with commit e7cfe79 Dec 30, 2024
28 of 29 checks passed
@yezizp2012 yezizp2012 deleted the feat/support-switch-db branch December 30, 2024 08:43
@lmatz lmatz added the user-facing-changes Contains changes that are visible to users label Jan 15, 2025
Copy link
Contributor

Hi, there.

📝 Telemetry Reminder:
If you're implementing this feature, please consider adding telemetry metrics to track its usage. This helps us understand how the feature is being used and improve it further.
You can find the function report_event of telemetry reporting in the following files. Feel free to ask questions if you need any guidance!

  • src/frontend/src/telemetry.rs
  • src/meta/src/telemetry.rs
  • src/stream/src/telemetry.rs
  • src/storage/compactor/src/telemetry.rs
    Or calling report_event_common (src/common/telemetry_event/src/lib.rs) as if finding it hard to implement.
    ✨ Thank you for your contribution to RisingWave! ✨

This is an automated comment created by the peaceiris/actions-label-commenter. Responding to the bot or mentioning it won't have any effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: set database of the current session
3 participants