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