Re: Error in trying to dump any database

From: Colin Campbell <sgcccdc(at)citec(dot)qld(dot)gov(dot)au>
To: Martin Weinberg <weinberg(at)osprey(dot)astro(dot)umass(dot)edu>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error in trying to dump any database
Date: 2001-08-31 01:42:21
Message-ID: Pine.BSF.4.33.0108311134560.38706-100000@guru.citec.qld.gov.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I recently had a similar problem (7.1.2) and I suspect you are suffering
the same. It turned out to (probably) be a compiler optimzation problem.
I could do

select int4(4::int8/4::int8);

and it would work on a machine compiled under gcc 2.95.2 but failed with
"int8 conversion to int4 is out of range" on a box comiled under 2.7.2.1.

My problem was with int84() and its offending code is almost identical to
dtoi4() which is this little piece of goods here.

if ((num < INT_MIN) || (num > INT_MAX))
elog(ERROR, "dtoi4: integer out of range");

If I were you I'd change this to

if (num < INT_MIN)
elog(ERROR, "dtoi4: integer out of range - too small");
if (num > INT_MAX)
elog(ERROR, "dtoi4: integer out of range - too big");

recompile and the (hopefully) watch the problem go away.

On Thu, 30 Aug 2001, Martin Weinberg wrote:

> I have a 7.1.2 system which gives the following error on any pg_dump:
>
> DumpComment: SELECT failed: 'ERROR: dtoi4: integer out of range
> '.
>
> This happens with any database. E.g. I made a very tiny database
> with a single table and two records and the same error and message
> is obtained.

Colin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2001-08-31 02:06:00 Re: Majordomo being upgraded ...
Previous Message Karen Ellrick 2001-08-31 01:34:50 Re: url to free text search stategies in postgresql?