From cristi@dmhi.ct.ro Tue Nov 5 05:58:43 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DEF02474E5C for ; Tue, 5 Nov 2002 00:58:43 -0500 (EST) Received: from dmhi.ct.ro (dmhi.ct.ro [193.226.151.66]) by postgresql.org (Postfix) with ESMTP id C1C5347674C for ; Tue, 5 Nov 2002 00:58:42 -0500 (EST) Received: from [192.168.1.114] (helo=aaa) by dmhi.ct.ro with smtp (Exim 3.03 #1) id 188wkP-0004U7-00 for pgsql-sql@postgresql.org; Tue, 05 Nov 2002 07:59:33 +0200 Message-ID: <003d01c28490$310d2fa0$7201a8c0@aaa> From: "cristi" To: Subject: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 07:57:13 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003A_01C284A0.F3603EC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/54 X-Sequence-Number: 10196 This is a multi-part message in MIME format. ------=_NextPart_000_003A_01C284A0.F3603EC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 When I'm trying to make pg_dump on a data base I have this message: WARNING: owner of type 'mmm' apperars to be invalid WARNING: owner of type 'eee' apperars to be invalid WARNING: owner of type 'refcursor' apperars to be invalid Where are these object and how can I destroy its? =20 ------=_NextPart_000_003A_01C284A0.F3603EC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
When I'm trying to make pg= _dump on=20 a data base I have this message:
WARNING: owner of type 'mmm' apperars to b= e=20 invalid
WARNING: owner of type 'eee' apperars to be invalid
WARNING: = owner=20 of type 'refcursor' apperars to be invalid
Where are these object and how can I=20 destroy its?
 
------=_NextPart_000_003A_01C284A0.F3603EC0-- From dev@archonet.com Tue Nov 5 11:00:09 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E1F12476392 for ; Tue, 5 Nov 2002 06:00:09 -0500 (EST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by postgresql.org (Postfix) with ESMTP id EE5BD4762E9 for ; Tue, 5 Nov 2002 06:00:08 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1891RI-0003Xd-0Y; Tue, 05 Nov 2002 11:00:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id A613C17693; Tue, 5 Nov 2002 10:57:48 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 1890C17692; Tue, 5 Nov 2002 10:57:48 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "cristi" , Subject: Re: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 10:57:55 +0000 User-Agent: KMail/1.4.3 References: <003d01c28490$310d2fa0$7201a8c0@aaa> In-Reply-To: <003d01c28490$310d2fa0$7201a8c0@aaa> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211051057.56017.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/55 X-Sequence-Number: 10197 On Tuesday 05 Nov 2002 5:57 am, cristi wrote: > When I'm trying to make pg_dump on a data base I have this message: > > WARNING: owner of type 'mmm' apperars to be invalid > WARNING: owner of type 'eee' apperars to be invalid > WARNING: owner of type 'refcursor' apperars to be invalid > > Where are these object and how can I destroy its? richardh=3D> select oid,typname,typowner from pg_type where typname=3D'refc= ursor'; oid | typname | typowner ------+-----------+---------- 1790 | refcursor | 1 richardh=3D> select * from pg_user where usesysid=3D1; usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | pas= swd=20=20 | valuntil ----------+----------+-------------+----------+----------+-----------+-----= -----+---------- postgres | 1 | t | t | t | t |=20 I'd recommend you add a user with the required id, then dump the database a= nd=20 fix the dump as required. The owner of "refcursor" should be postgres (or= =20 whatever the system user is called) - if that user has been deleted, I'd be= =20 surprised that's the only errors you get. --=20 Richard Huxton From cristi@dmhi.ct.ro Tue Nov 5 13:04:50 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC030476633 for ; Tue, 5 Nov 2002 08:04:50 -0500 (EST) Received: from dmhi.ct.ro (dmhi.ct.ro [193.226.151.66]) by postgresql.org (Postfix) with ESMTP id 427A74762DE for ; Tue, 5 Nov 2002 08:04:43 -0500 (EST) Received: from [192.168.1.114] (helo=aaa) by dmhi.ct.ro with smtp (Exim 3.03 #1) id 1893OT-0000F0-00 for pgsql-sql@postgresql.org; Tue, 05 Nov 2002 15:05:21 +0200 Message-ID: <015301c284cb$aba15620$7201a8c0@aaa> From: "cristi" To: References: <003d01c28490$310d2fa0$7201a8c0@aaa> <200211051057.56017.dev@archonet.com> <005101c284c2$3fe836a0$7201a8c0@aaa> <200211051222.18585.dev@archonet.com> Subject: Re: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 15:03:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/57 X-Sequence-Number: 10199 It shouldn't be this the solution of the problem? salt=# delete from pg_type where typname='refcursor'; DELETE 1 salt=# delete from pg_type where typname='eee'; DELETE 1 salt=# delete from pg_type where typname='mmm'; DELETE 1 Now, I don't have the error message! Mr.Richard Huxton, thank you very much! Cristi On Tuesday 05 Nov 2002 11:55 am, cristi wrote: > I'm in this situation: > > salt=# select oid,typname,typowner from pg_type where typname='refcursor'; > oid | typname | typowner > ----------+-----------+---------- > 13701973 | refcursor | 0 > (1 row) > > salt=# select * from pg_user where usesysid=0; > usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | > passwd > (0 rows) Hmm - try the following (it should show the 5 users with lowest number - the first should be 'postgres'). SELECT * FROM pg_user ORDER BY usesysid limit 5; > 1)Which is the user with the required id in my case? > 2)How can I add a user with the required id?(the command) Hmm - assuming the query above is good, I'd change "typowner" in "pg_type" instead. Also the following should all display the same typowner (but we know there is a problem with refcursor). That typowner should be the postgres user. SELECT typname,typowner FROM pg_type WHERE typname LIKE 'r%'; -- Richard Huxton From dev@archonet.com Tue Nov 5 13:30:08 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 86CE647608D for ; Tue, 5 Nov 2002 08:30:08 -0500 (EST) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by postgresql.org (Postfix) with ESMTP id B26D7475E9D for ; Tue, 5 Nov 2002 08:30:00 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1893mN-000HA9-0V; Tue, 05 Nov 2002 13:30:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 74A5A178DF; Tue, 5 Nov 2002 13:21:24 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id E0D43178DD; Tue, 5 Nov 2002 13:21:23 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "cristi" , Subject: Re: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 13:21:31 +0000 User-Agent: KMail/1.4.3 References: <003d01c28490$310d2fa0$7201a8c0@aaa> <200211051222.18585.dev@archonet.com> <015301c284cb$aba15620$7201a8c0@aaa> In-Reply-To: <015301c284cb$aba15620$7201a8c0@aaa> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211051321.31846.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/58 X-Sequence-Number: 10200 On Tuesday 05 Nov 2002 1:03 pm, cristi wrote: > It shouldn't be this the solution of the problem? > > salt=3D# delete from pg_type where typname=3D'refcursor'; > DELETE 1 > salt=3D# delete from pg_type where typname=3D'eee'; > DELETE 1 > salt=3D# delete from pg_type where typname=3D'mmm'; > DELETE 1 > > Now, I don't have the error message! > > Mr.Richard Huxton, thank you very much! But - you have deleted the "refcursor" type which is not a good idea! If yo= u=20 don't use cursors you might get away with it, but I'd be nervous about it. If you create a new database does it contain the refcursor type? If so, dro= p=20 and recreate the database, restoring the data to it. If not, I think you'll= =20 need to restore the template1 db - there's an article on=20 techdocs.postgresql.org about this (byJosh IIRC). --=20 Richard Huxton From cristi@dmhi.ct.ro Tue Nov 5 14:33:43 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E690C475E7B for ; Tue, 5 Nov 2002 09:33:43 -0500 (EST) Received: from dmhi.ct.ro (dmhi.ct.ro [193.226.151.66]) by postgresql.org (Postfix) with ESMTP id 99522475E4D for ; Tue, 5 Nov 2002 09:33:40 -0500 (EST) Received: from [192.168.1.114] (helo=aaa) by dmhi.ct.ro with smtp (Exim 3.03 #1) id 1894mi-00018L-00 for pgsql-sql@postgresql.org; Tue, 05 Nov 2002 16:34:28 +0200 Message-ID: <019501c284d8$1f0c5720$7201a8c0@aaa> From: "cristi" To: References: <003d01c28490$310d2fa0$7201a8c0@aaa> <200211051222.18585.dev@archonet.com> <015301c284cb$aba15620$7201a8c0@aaa> <200211051321.31846.dev@archonet.com> Subject: Re: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 16:32:07 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/61 X-Sequence-Number: 10203 On Tuesday 05 Nov 2002 1:03 pm, cristi wrote: > It shouldn't be this the solution of the problem? >> salt=# delete from pg_type where typname='refcursor'; >> DELETE 1 >> Now, I don't have the error message! > >Mr.Richard Huxton, thank you very much! >But - you have deleted the "refcursor" type which is not a good idea! If you >don't use cursors you might get away with it, but I'd be nervous about it. >If you create a new database does it contain the refcursor type? Ooo!!!! Yes, I see... You right. >If so, drop and recreate the database, restoring the data to it. If not, I think you'll >need to restore the template1 db - there's an article on >techdocs.postgresql.org about this (byJosh IIRC). Would you give me the URL address for this article? Please! From dev@archonet.com Tue Nov 5 15:00:02 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 94742476309 for ; Tue, 5 Nov 2002 10:00:02 -0500 (EST) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by postgresql.org (Postfix) with ESMTP id 09A6E4762A6 for ; Tue, 5 Nov 2002 10:00:00 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 1895BT-0001a3-0U; Tue, 05 Nov 2002 15:00:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 3110F178F6; Tue, 5 Nov 2002 14:50:56 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 8D13016D9D; Tue, 5 Nov 2002 14:50:55 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "cristi" , Subject: Re: owner of type 'mmm' apperars to be invalid Date: Tue, 5 Nov 2002 14:51:03 +0000 User-Agent: KMail/1.4.3 References: <003d01c28490$310d2fa0$7201a8c0@aaa> <200211051321.31846.dev@archonet.com> <019501c284d8$1f0c5720$7201a8c0@aaa> In-Reply-To: <019501c284d8$1f0c5720$7201a8c0@aaa> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211051451.03482.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/62 X-Sequence-Number: 10204 On Tuesday 05 Nov 2002 2:32 pm, cristi wrote: > On Tuesday 05 Nov 2002 1:03 pm, cristi wrote: > >But - you have deleted the "refcursor" type which is not a good idea! If > Ooo!!!! > Yes, I see... > You right. > > >If so, drop and recreate the database, restoring the data to it. If not,= I > think you'll > >need to restore the template1 db - there's an article on > >techdocs.postgresql.org about this (byJosh IIRC). > > Would you give me the URL address for this article? > Please! It's "Adventures in PostgreSQL, Episode 1 by Josh Berkus" at http://techdocs.postgresql.org/ Loads of other good stuff there too. Might not be necessary though - if the template1 db contains the refcursor= =20 type definition then you just need to drop and recreate the problem databas= e. --=20 Richard Huxton