Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5TCYAa23791 for ; Fri, 29 Jun 2001 08:34:10 -0400 (EDT) (envelope-from pgsql-admin-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5OLVoa45238 for ; Sun, 24 Jun 2001 17:31:50 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f5OLLdY78285 for pgsql-admin@postgresql.org; Sun, 24 Jun 2001 17:21:39 -0400 (EDT) (envelope-from news) From: Kostis Mentzelos X-Newsgroups: comp.databases.postgresql.admin Subject: Re: rename a table Date: Mon, 25 Jun 2001 00:21:14 +0300 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 13 Message-ID: <3B3659CA.BAADC592@ematic.com> References: <3B31AB47.2A46172B@ematic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.4 i586) X-Accept-Language: en To: pgsql-admin@postgresql.org X-Archive-Number: 200106/175 X-Sequence-Number: 1746 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.