Re: sanity check fails

From: Johann Spies <jhspies(at)adept(dot)co(dot)za>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: sanity check fails
Date: 2000-05-16 08:51:03
Message-ID: 20000516105103.A925@futurenet.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks Tom.

On Tue, May 16, 2000 at 12:49:33AM -0400, Tom Lane wrote:
> Johann Spies <jhspies(at)adept(dot)co(dot)za> 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

Browse pgsql-sql by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2000-05-16 11:37:22 Using substr with user defined types
Previous Message omid omoomi 2000-05-16 08:28:29 Re: pattern matching operator