
> > IIRC oid uses int4in/int4out and those should definitely be able to parse
> > -1040 into a 4 byte signed long without platform dependency, no ?
> 
> Tom Lane changed this recently to have OID use its own i/o routines.

Reading the code, I don't understand it. Why would strtoul return an int in the 
first place ? The name seems to imply an unsigned long return type. 
Seems config should check the return type of strtoul.

Andreas

Thu, 21 Dec 2000 16:18:31 +0100
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
AW: AW: PostgreSQL pre-7.1 Linux/Alpha Status...
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
> Reading the code, I don't understand it. Why would strtoul return an
> int in the first place ? The name seems to imply an unsigned long
> return type.

What's your point?

	unsigned long cvt;

	cvt = strtoul(s, &endptr, 10);

The trick is to get from unsigned long to oid (which is unsigned int)
on machines where those are different sizes.

			regards, tom lane

Thu, 21 Dec 2000 10:34:58 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: AW: AW: PostgreSQL pre-7.1 Linux/Alpha Status... 