Skip site navigation (1) Skip section navigation (2)

Re: invalid types and tables

From: "Sandy Spence" <axs(at)aber(dot)ac(dot)uk>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"'Shoaib Mir'" <shoaibmir(at)gmail(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: invalid types and tables
Date: 2006-12-15 16:30:54
Message-ID: 004701c72066$64238170$520b3cc1@pc2axs (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi Tom and Shoaib,

Hi Tom and Shoaib,

thanks for the help, one last question I hope, how do I cross reference the
pg_class, pg_user and pg_type so that I can obtain the usesysid of the
missing owner?



Computer Officer, RA Certification Manager
Department of Computer Science - UWA
Llandinam Building
Penglais Campus
Wales - UK
SY23 3DB
Tel: (01970)-622433
Fax: (01970)-628536

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: 15 December 2006 15:50
To: Shoaib Mir
Cc: Sandy Spence; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] invalid types and tables 

"Shoaib Mir" <shoaibmir(at)gmail(dot)com> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


In response to


pgsql-admin by date

Next:From: Tom LaneDate: 2006-12-15 16:51:29
Subject: Re: invalid types and tables
Previous:From: Shoaib MirDate: 2006-12-15 16:21:57
Subject: Re: invalid types and tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group