Skip to content

Conversation

@watford-ep
Copy link

@watford-ep watford-ep commented Oct 29, 2025

This adds support for the RESET statement to the base dialect.

Comment on lines 1210 to 1220

/// Returns true if the dialect supports the `RESET` statement
/// for resetting session variables.
///
/// ```sql
/// RESET configuration_parameter;
/// RESET ALL;
/// ```
fn supports_reset(&self) -> bool {
false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns true if the dialect supports the `RESET` statement
/// for resetting session variables.
///
/// ```sql
/// RESET configuration_parameter;
/// RESET ALL;
/// ```
fn supports_reset(&self) -> bool {
false
}

I think we can let the parser always accept the statement if it shows up, without considering the dialect

Copy link
Author

@watford-ep watford-ep Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do. I think out of the list of dialects only ANSI, sqlite, and Hive lack support (Hive SQL doesn't take a parameter).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the ticket to include exactly which dialects support RESET, and its a bit touch and go. Right now this seems reasonable (in that it accepts a very reasonable use, though not strictly correct for all dialects).

@watford-ep watford-ep changed the title feat: Add RESET to the Postgres dialect #2078 feat: Add RESET to the base dialect #2078 Oct 30, 2025
@watford-ep watford-ep requested a review from iffyio October 31, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for RESET statement

2 participants