psql -d appdb -c "ALTER TABLE users RENAME TO members;"
Rename a table
Renames the table; dependent views and functions are not automatically updated and may need ALTER. Existing indexes keep their names. Run it in a quiet window to avoid breaking running queries.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.