Skip to content

Snowflake: role tagging grammar (ALTER ROLE SET/UNSET TAG, CREATE ROLE ... WITH TAG) - #22

Open
hovaesco wants to merge 1 commit into
snowflake/create-stream-append-onlyfrom
lav-1596-role-tags
Open

Snowflake: role tagging grammar (ALTER ROLE SET/UNSET TAG, CREATE ROLE ... WITH TAG)#22
hovaesco wants to merge 1 commit into
snowflake/create-stream-append-onlyfrom
lav-1596-role-tags

Conversation

@hovaesco

Copy link
Copy Markdown

Adds Snowflake grammar for role tagging (LAV-1596):

  • ALTER ROLE [IF EXISTS] <name> { SET TAG <t> = '<v>' [, …] | UNSET TAG <t> [, …] } routed through the shared parse_alter_object_set_tags (mirrors the ALTER SCHEMA maybe_parse form); non-tag ALTER ROLE forms keep falling through.
  • if_exists added to Statement::SetTags (also enables ALTER DATABASE|SCHEMA|ROLE IF EXISTS … SET TAG).
  • CREATE [OR REPLACE] ROLE [IF NOT EXISTS] <name> WITH TAG (<t> = '<v>' [, …]) via a new trailing-only with_tags field on CreateRole.

🤖 Generated with Claude Code

…G, CREATE ROLE ... WITH TAG

Route ALTER ROLE <name> { SET | UNSET } TAG through parse_alter_object_set_tags
(mirroring the ALTER SCHEMA maybe_parse form) so the tag form requires a name and
non-tag forms keep falling through. Add if_exists to Statement::SetTags (also
enables ALTER DATABASE|SCHEMA|ROLE IF EXISTS ... SET TAG). Add a trailing-only
WITH TAG (...) clause to CREATE ROLE via a new with_tags field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant