Skip site navigation (1) Skip section navigation (2)

Re: txid strtoull fix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: txid strtoull fix
Date: 2007-10-08 22:09:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
"Marko Kreen" <markokr(at)gmail(dot)com> writes:
> On 10/8/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> (Note that your overflow test didn't actually work; AFAIK there
>> really isn't any decent solution other than dividing at each step.)

> Hmm.  It did seem to work here.  Just in case I peeked into
> FreeBSD strtoull() and this patch imitates their method.

Well, it worked for the one specific case you tested, but there are
other cases it would fail to detect overflow for.  (When you're
multiplying by ten, the overflow might not be small.)  The FreeBSD
way looks OK though --- applied.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-08 23:25:14
Subject: Preliminary patch for tsearch example dictionaries/parsers in contrib
Previous:From: Alvaro HerreraDate: 2007-10-08 20:53:20
Subject: Re: [HACKERS] Add function forquote_qualified_identifier?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group