Re: Rejection of the smallest int8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sugita(at)sra(dot)co(dot)jp
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Rejection of the smallest int8
Date: 2001-11-21 17:54:31
Message-ID: 19439.1006365271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I said:
> If you can see a way around that, we're all ears ...

Of course there's always the brute-force solution:

if (strcmp(ptr, "-9223372036854775808") == 0)
return -9223372036854775808;
else
<<proceed with int8in>>

(modulo some #ifdef hacking to attach the correct L or LL suffix to the
constant, but you get the idea)

This qualifies as pretty durn ugly, but might indeed be more portable
than any other alternative. Comments?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-21 18:12:56 Re: Regression tests need updating...
Previous Message Bruce Momjian 2001-11-21 16:47:40 Re: beta3

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Sullivan 2001-11-21 19:03:14 Re: [PATCHES] Version checking when loading psql
Previous Message Joe Conway 2001-11-21 17:04:41 Re: [PATCHES] PQescapeBytea documentation patch