You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/08/24 10:49:56 UTC

(datafusion-sqlparser-rs) branch gh-readonly-queue/main/pr-2413-f00a57bf2b919396650026e0f626216697da9c29 created (now 80a211fb)

This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a change to branch gh-readonly-queue/main/pr-2413-f00a57bf2b919396650026e0f626216697da9c29
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git


      at 80a211fb Support PostgreSQL's `RESET SESSION AUTHORIZATION` (#2413)

This branch includes the following new commits:

     new 80a211fb Support PostgreSQL's `RESET SESSION AUTHORIZATION` (#2413)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org


(datafusion-sqlparser-rs) 01/01: Support PostgreSQL's `RESET SESSION AUTHORIZATION` (#2413)

Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-2413-f00a57bf2b919396650026e0f626216697da9c29
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git

commit 80a211fb7ee300f9817f5de652536d41c1abdc39
Author: Luca Cappelletti <ca...@gmail.com>
AuthorDate: Mon Aug 24 10:49:31 2026 +0000

    Support PostgreSQL's `RESET SESSION AUTHORIZATION` (#2413)
---
 src/ast/mod.rs            | 6 +++++-
 src/parser/mod.rs         | 6 ++++++
 tests/sqlparser_common.rs | 6 ++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/ast/mod.rs b/src/ast/mod.rs
index 656a90d2..4d86dd6a 100644
--- a/src/ast/mod.rs
+++ b/src/ast/mod.rs
@@ -12199,13 +12199,16 @@ pub enum Reset {
     /// Resets all session parameters to their default values.
     ALL,
 
+    /// Resets session authorization to the session user.
+    SessionAuthorization,
+
     /// Resets a specific session parameter to its default value.
     ConfigurationParameter(ObjectName),
 }
 
 /// Resets a session parameter to its default value.
 /// ```sql
-/// RESET { ALL | <configuration_parameter> }
+/// RESET { ALL | SESSION AUTHORIZATION | <configuration_parameter> }
 /// ```
 #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
@@ -12281,6 +12284,7 @@ impl fmt::Display for ResetStatement {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match &self.reset {
             Reset::ALL => write!(f, "RESET ALL"),
+            Reset::SessionAuthorization => write!(f, "RESET SESSION AUTHORIZATION"),
             Reset::ConfigurationParameter(param) => write!(f, "RESET {}", param),
         }
     }
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index a20f79db..fe9fdace 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -21213,6 +21213,12 @@ impl<'a> Parser<'a> {
             return Ok(ResetStatement { reset: Reset::ALL });
         }
 
+        if self.parse_keywords(&[Keyword::SESSION, Keyword::AUTHORIZATION]) {
+            return Ok(ResetStatement {
+                reset: Reset::SessionAuthorization,
+            });
+        }
+
         let obj = self.parse_object_name(false)?;
         Ok(ResetStatement {
             reset: Reset::ConfigurationParameter(obj),
diff --git a/tests/sqlparser_common.rs b/tests/sqlparser_common.rs
index 7e03389a..6ca8d559 100644
--- a/tests/sqlparser_common.rs
+++ b/tests/sqlparser_common.rs
@@ -19242,6 +19242,12 @@ fn parse_reset_statement() {
         Statement::Reset(ResetStatement { reset }) => assert_eq!(reset, Reset::ALL),
         _ => unreachable!(),
     }
+    match verified_stmt("RESET SESSION AUTHORIZATION") {
+        Statement::Reset(ResetStatement { reset }) => {
+            assert_eq!(reset, Reset::SessionAuthorization)
+        }
+        _ => unreachable!(),
+    }
 }
 
 #[test]


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org