pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Johann Spies <jhspies@adept.co.za>
To: pgsql-sql@postgresql.org
Subject: Re: sanity check fails
Date: Tue, 16 May 2000 10:51:03 +0200
Message-ID: <20000516105103.A925@futurenet.co.za> (raw)

Thanks Tom.

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



view thread (3+ messages)

Message-ID: <20000516105103.A925@futurenet.co.za>
Permalink:  ../20000516105103.A925@futurenet.co.za/
Also on:    postgresql.org/message-id/20000516105103.A925@futurenet.co.za

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jhspies@adept.co.za
  Subject: Re: sanity check fails
  In-Reply-To: <20000516105103.A925@futurenet.co.za>
  References: <20000516105103.A925@futurenet.co.za>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox