Received: from ether.adept.co.za (ether.adept.co.za [196.25.67.7]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA43248 for ; Tue, 16 May 2000 04:51:53 -0400 (EDT) (envelope-from jhspies@adept.co.za) Received: from Johann (dial-50.adept.co.za [196.25.67.50]) by ether.adept.co.za (Postfix) with ESMTP for id 629FF3CB; Tue, 16 May 2000 16:58:46 +0200 (SAST) Received: from jhspies by Johann with local (Exim 2.05 #1 (Debian)) id 12rd4B-0000F9-00; Tue, 16 May 2000 10:51:03 +0200 Date: Tue, 16 May 2000 10:51:03 +0200 From: Johann Spies To: pgsql-sql@postgresql.org Subject: Re: sanity check fails Message-ID: <20000516105103.A925@futurenet.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i X-Archive-Number: 200005/7 Thanks Tom. On Tue, May 16, 2000 at 12:49:33AM -0400, Tom Lane wrote: > Johann Spies writes: > > When I try to backup my database using pg_dump I get the following error: > > -- dumping out user-defined functions > > failed sanity check, type with oid 96867 was not found > > How can I correct that? > > It sounds like you had a user-defined type that you deleted without > first having deleted all the functions that accepted or returned that > type. You can look for the culprit function with > > select * from pg_proc where prorettype = 96867 or > pg_proc.proargtypes[0] = 96867 or > pg_proc.proargtypes[1] = 96867 or > ... > pg_proc.proargtypes[7] = 96867; > The output was proname |proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype| proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc |probin -------------+--------+-------+--------+------------+-------------+--------+---------+----------+-------------------+-----------+--------------+--------------+--------------+------------------------------+------ double_salary| 513726| 14|f |t |f | 1|f | 23|96867 0 0 0 0 0 0 0| 100| 0| 0| 100|SELECT $1.salary * 2 AS salary|- (1 row) I do not understand the output. It seems to refer to some left-overs of a tutorial I ran some time ago. I have removed all the remaining tables of that tutorial. But how can I get a list of user defined functions? Doing a \df in psql results in an output of more that 900 lines. Johann -- J.H. Spies, Hugenotestraat 29, Posbus 80, Franschhoek, 7690, South Africa Tel/Faks 021-876-2337 Sel/Cell 082 898 1528(Johann) 082 255 2388(Hester) "In my Father's house are many mansions: if it were not so, I would have told you. I go to prepare a place for you. And if I go and prepare a place for you, I will come again, and receive you unto myself; that where I am, there ye may be also." John 14:2,3