Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4D0D9B5DC5B for ; Mon, 5 Sep 2011 13:46:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 86160-07-2 for ; Mon, 5 Sep 2011 16:46:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 23D47B5DECD for ; Mon, 5 Sep 2011 13:46:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p85Gk1w3008882; Mon, 5 Sep 2011 12:46:02 -0400 (EDT) To: Lukasz Brodziak cc: pgsql-admin@postgresql.org Subject: Re: Schema with OID 0 does not exist in pg_dump In-reply-to: References: <25644.1314885154@sss.pgh.pa.us> Comments: In-reply-to Lukasz Brodziak message dated "Mon, 05 Sep 2011 13:06:33 +0200" Date: Mon, 05 Sep 2011 12:46:01 -0400 Message-ID: <8881.1315241161@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/13 X-Sequence-Number: 38250 Lukasz Brodziak writes: > Ok, I've found the rows theyh were placed in pg_operator table. After > deletion I get the following error in pg_dump: > pg_dump: Error message from server: ERROR: operator is not unique: smallint > <> integer > LINE 1: ...d = relowner) AS rolname, relchecks, (reltriggers <> 0) AS r... > ^ > HINT: Could not choose a best candidate operator. You may need to add > explicit type casts. Kinda looks like you deleted some rows you shouldn't have ... the above is about what I'd expect to happen if you'd removed the int2 <> int4 operator. Do you know what you removed, exactly? You might try comparing the contents of pg_operator with another, non-broken database, and putting back whatever's missing. regards, tom lane