Skip to content

Conversation

@yoavcloud
Copy link
Contributor

No description provided.

/// ALTER USER [ IF EXISTS ] [ <name> ] [ OPTIONS ]
/// ```
///
/// [Snowflake](https://docs.snowflake.com/en/sql-reference/sql/alter-user)
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems we dropped this doc reference, could we add it back together with the new pg reference?

}
verified_stmt("ALTER USER u1 SET DEFAULT_SECONDARY_ROLES=('ALL'), PASSWORD='secret', WORKLOAD_IDENTITY=(TYPE=AWS, ARN='arn:aws:iam::123456789:r1/')");

verified_stmt("ALTER USER u1 PASSWORD 'AAA'");
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add test cases for ENCRYPTED and PASSWORD NULL?

Comment on lines 298 to 309
if self.parse_keyword(Keyword::NULL) {
Some(AlterUserPassword {
encrypted,
password: None,
})
} else {
let password = self.parse_literal_string()?;
Some(AlterUserPassword {
encrypted,
password: Some(password),
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

minor probably to clarify the code, we could do e.g.

let password = if self.parse_keyword(Keyword::NULL) {
    None
} else {
    Some(self.parse_literal_string()?)
};
Some(AlterUserPassword {
    encrypted,
    password,
})

@yoavcloud yoavcloud force-pushed the pg_alter_user_password branch from 4d6ec1f to cbbd106 Compare January 9, 2026 11:05
@yoavcloud yoavcloud force-pushed the pg_alter_user_password branch from cbbd106 to 9df7e3d Compare January 9, 2026 11:10
@yoavcloud yoavcloud added this pull request to the merge queue Jan 9, 2026
Merged via the queue into apache:main with commit ab76a07 Jan 9, 2026
10 checks passed
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.

2 participants