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

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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;
	   <<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


pgsql-hackers by date

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

pgsql-patches by date

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

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