PostgreSQL rename table - cascade renaming to objects like indices, constraints that contain table name (stackoverflow.com)stack
13 points by Tom in stackoverflow.com · 5y ago · stack
I renamed my tables with ALTER TABLE _ RENAME TO _ : ALTER TABLE foods RENAME TO food; ALTER TABLE foods_nutrients RENAME TO food_nutrient; It worked, however other database objects like indices, sequences and constraints that contained these table names didn't update. So I had…
filed under postgresql