Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 433B19F9FE1 for ; Mon, 18 Dec 2006 05:16:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 01909-07 for ; Mon, 18 Dec 2006 05:16:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from cefni.aber.ac.uk (cefni.aber.ac.uk [144.124.16.40]) by postgresql.org (Postfix) with ESMTP id D7C369F9357 for ; Mon, 18 Dec 2006 05:16:45 -0400 (AST) Received: from localhost ([127.0.0.1] helo=cefni.aber.ac.uk) by cefni.aber.ac.uk with esmtp (Exim 4.54) id 1GwEc0-0002uN-6t; Mon, 18 Dec 2006 09:16:44 +0000 Received: from pc2axs.dcs.aber.ac.uk ([193.60.11.82] helo=pc2axs) by cefni.aber.ac.uk with esmtp (Exim 4.54) id 1GwEbc-0002sL-9F; Mon, 18 Dec 2006 09:16:20 +0000 From: "Sandy Spence" To: "'Tom Lane'" , "'Shoaib Mir'" Cc: Subject: Re: invalid types and tables Date: Mon, 18 Dec 2006 09:16:24 -0000 Message-ID: <001b01c72285$340f4840$520b3cc1@pc2axs> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <9165.1166197788@sss.pgh.pa.us> Thread-Index: AccgaiQ99H41VHnkSyW+Gyi+oIWKQwCGroYg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Sophos-Scanned: from axs@aber.ac.uk virus scanned OK X-UWA-Mid: 1GwEbc-0002sL-9F X-UWA-Originating-IP: 193.60.11.82 X-UWA-Bounce-Filter: AcT5CbGzkO6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/245 X-Sequence-Number: 24037 Hi Tom and Shoaib, Thanks for all your help, the penny dropped and I now understand what you meant by SYSID. I have traced the usename and all is now well. Regards, Sandy Computer Officer, RA Certification Manager Department of Computer Science - UWA Llandinam Building Penglais Campus Aberystwyth Ceredigion Wales - UK SY23 3DB Tel: (01970)-622433 Fax: (01970)-628536 -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: 15 December 2006 15:50 To: Shoaib Mir Cc: Sandy Spence; pgsql-admin@postgresql.org Subject: Re: [ADMIN] invalid types and tables "Shoaib Mir" writes: > Well I will not recommend deleting rows like this from the meta data, > but if I will rather try using ALTER TABLE and ALTER TYPE to assign an > owner for the missing user referenced type or table No, just create a new user with the same usesysid as is shown as the owner in pg_class etc. See the SYSID option to CREATE USER. (FWIW, more recent PG versions prevent you from dropping users that still own objects.) regards, tom lane