Skip to content

Add support for Alter View Rename Column in Postgres v13#1228

Merged
mrigger merged 2 commits into
sqlancer:mainfrom
yaojiejia:psql_v13_alter_type
Jun 3, 2025
Merged

Add support for Alter View Rename Column in Postgres v13#1228
mrigger merged 2 commits into
sqlancer:mainfrom
yaojiejia:psql_v13_alter_type

Conversation

@yaojiejia

@yaojiejia yaojiejia commented May 24, 2025

Copy link
Copy Markdown
Contributor

Closes 6. ALTER VIEW RENAME COLUMN in #912
For some reason, FORCE_PARALLEL_MODE will not work locally without commenting out and I suspect it is due to a deprecated issue, so I'm just commenting out for now.

// If this is a view, only allow view-compatible operations
if (randomTable.isView()) {
// Remove all table-specific operations for views
action.removeIf(a -> a != Action.ALTER_VIEW_RENAME_COLUMN);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we want to create a list of actions (that are only possible on a view) and use that list in this check? That way, if / when we add more view-only actions, we wouldn't miss them here (and line 112 below).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's right, I will add a list only for view actions and use it here, thanks for the suggestion

@mrigger mrigger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Almost looks good to me. It seems the FORCE_PARALLEL_MODE change might have been accidental?

JOIN_COLLAPSE_LIMIT("join_collapse_limit", (r) -> r.getInteger(1, Integer.MAX_VALUE)),
PARALLEL_LEADER_PARTICIPATION("parallel_leader_participation", (r) -> Randomly.fromOptions(1, 0)),
FORCE_PARALLEL_MODE("force_parallel_mode", (r) -> Randomly.fromOptions("off", "on", "regress")),
// FORCE_PARALLEL_MODE("force_parallel_mode", (r) -> Randomly.fromOptions("off", "on", "regress")),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess this is an accidental commit? I see this change also in #1227.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep it is something with my local. You can ignore this specific change, thanks!

@mrigger mrigger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@mrigger mrigger merged commit 441dba2 into sqlancer:main Jun 3, 2025
16 of 26 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.

3 participants