Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8878F9FA2FD for ; Fri, 15 Dec 2006 12:22:03 -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 64453-07 for ; Fri, 15 Dec 2006 12:21:58 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.229]) by postgresql.org (Postfix) with ESMTP id 5A4A79FA2A7 for ; Fri, 15 Dec 2006 12:21:58 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id i11so432298nzh for ; Fri, 15 Dec 2006 08:21:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=eRbej5XgXtyLH/FyNEIMBwS39LWbWfmAikVcOQDsGVHO/g47LGacNzgYjm61i7Lz3A83P+oFNlIBMfM09tc/X2OkQYjuDMpo7WCxzNDIOfLgNQicUz8gFIOAQHlRmaIepSEWlkRYvzoBs4pleDELZLC8KOaLxuUuaAA3RaMa5ds= Received: by 10.64.156.3 with SMTP id d3mr1462029qbe.1166199717290; Fri, 15 Dec 2006 08:21:57 -0800 (PST) Received: by 10.65.206.17 with HTTP; Fri, 15 Dec 2006 08:21:57 -0800 (PST) Message-ID: Date: Fri, 15 Dec 2006 21:21:57 +0500 From: "Shoaib Mir" To: "Tom Lane" Subject: Re: invalid types and tables Cc: "Sandy Spence" , pgsql-admin@postgresql.org In-Reply-To: <9165.1166197788@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_120603_21459146.1166199717242" References: <002a01c7204d$c4afba90$520b3cc1@pc2axs> <9165.1166197788@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/226 X-Sequence-Number: 24018 ------=_Part_120603_21459146.1166199717242 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Agreed, that will be a good solution for this scenario... Thanks, --------- Shoaib Mir EnterpriseDB (www,enterprisedb.com) On 12/15/06, Tom Lane wrote: > > "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 > ------=_Part_120603_21459146.1166199717242 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Agreed, that will be a good solution for this scenario...

Thanks,
---------
Shoaib Mir
EnterpriseDB (www,enterprisedb.com)

On 12/15/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Shoaib Mir" <shoaibmir@gmail.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

------=_Part_120603_21459146.1166199717242--