Re: Check for integer overflow in datetime functions

From: Neil Conway <neilc(at)samurai(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Check for integer overflow in datetime functions
Date: 2005-12-01 08:12:01
Message-ID: 1133424721.10985.22.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Wed, 2005-11-30 at 19:36 -0700, Michael Fuhr wrote:
> Check integer conversion for overflow in datetime functions.

It seems a bit laborious to always manually set errno to zero before
invoking strtol() (both in the places added by the patch, and all the
places that already did that). While it's only a minor notational
improvement, I wonder if it would be worth adding a pg_strtol() that did
the errno assignment so that each call-site wouldn't need to worry about
it?

-Neil

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2005-12-01 13:36:29 Re: aclchk.c refactor
Previous Message Tatsuo Ishii 2005-12-01 07:13:05 Re: A couple of proposed pgbench changes