Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Consider supporting a version of rename table that lets you replace a different table #12195

Closed
a-robinson opened this issue Dec 8, 2016 · 1 comment
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@a-robinson
Copy link
Contributor

a-robinson commented Dec 8, 2016

The idea is that syntax along the lines of ALTER TABLE foo REPLACE WITH bar would allow you to atomically drop foo and rename bar to foo. This came up in discussion on #12158 (direct comment link), in which we want to replace system.eventlog with a table that only differs in one of the primary key columns.

Alternatively, fixing #12123 such that a user could DROP a table and RENAME over it within a transaction would basically make this pointless.

I don't think we should do this unless other situations come up in which the same idea arises, but I want to make sure we at least track such situations so we can notice the pattern if it arises.

@petermattis petermattis added this to the Later milestone Feb 23, 2017
@knz knz added A-bulkio-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Apr 28, 2018
@petermattis petermattis removed this from the Later milestone Oct 5, 2018
@thoszhang
Copy link
Contributor

Closing in favor of #54562, which we intend to fix for 21.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

5 participants