Skip to main content
9 events
when toggle format what by license comment
Sep 23, 2022 at 8:12 history edited András Váczi CC BY-SA 4.0
added 497 characters in body
Sep 23, 2022 at 7:57 history edited András Váczi CC BY-SA 4.0
added 497 characters in body
Sep 23, 2022 at 7:50 comment added András Váczi @ErwinBrandstetter thanks for that detail! It's been a while I did this, and didn't have a Postgres box at hand yesterday.
Sep 22, 2022 at 23:38 comment added Erwin Brandstetter Doesn't seem unlikely. So three commands for the merry-go-round in this case.
Sep 22, 2022 at 22:54 comment added ypercubeᵀᴹ Yeah, I read that. I was thinking the alternative when client code cannot be changed at the same time.
Sep 22, 2022 at 22:29 comment added Erwin Brandstetter @ypercubeᵀᴹ: Yup, but the proposal here is to rename the old one to "something else". Should work if done in sync with client code stopping to write to the new column.
Sep 22, 2022 at 21:58 comment added ypercubeᵀᴹ @ErwinBrandstetter so we want to swap column names, we'll need 3 commands (in a transaction), right?
Sep 22, 2022 at 21:33 comment added Erwin Brandstetter About "ALTER TABLE for renaming both columns at the same time": it can only rename a single column in the same command. Use two commands wrapped in a single transaction. See: stackoverflow.com/a/23274931/939860
Sep 22, 2022 at 14:21 history answered András Váczi CC BY-SA 4.0