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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to