In order to rename the table safely, I want to REVOKE INSERT on that
table.
But there is a problem because if there are users connected to
database then REVOKE command wait until they disconnect.
How can I found out who are connected to database? Can I kill them?
--
I found out that SERIAL type creating a unique index. (RTFM)
I also found out that using ALTER TABLE x RENAME TO y I can rename
primary
keys and indexes.