Re: SPI bug. - Mailing list pgsql-hackers

From Neil Conway
Subject Re: SPI bug.
Date
Msg-id 4274E171.8010407@samurai.com
Whole thread Raw
In response to SPI bug.  (Tzahi Fadida <tzahi_ml@myrealbox.com>)
Responses Re: SPI bug.
Re: SPI bug.
List pgsql-hackers
Thomas Hallgren wrote:
> Since both int and long are types whos size that vary depending on 
> platform, and since the SPI protocol often interfaces with other 
> languages where the sizes are fixed

ISTM there are no "languages where the sizes are fixed". In this 
context, int and long are C and C++ types; types that happen to have the 
same name but different behavior (e.g. int and long in Java) are not the 
same type at all.

The reason the API types should use "long" is that the underlying 
executor APIs (e.g. ExecutorRun()) use "long". It might be a good idea 
to change the executor stuff to use int64s -- then I'd have no issue 
with making a corresponding change to the SPI APIs. I guess the main 
objection to doing this is that a 64-bit integral type is not available 
on all platforms (at least in theory; are there any platforms we care 
about that don't have one?)

-Neil


pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: SPI bug.
Next
From: Alvaro Herrera
Date:
Subject: Re: Feature freeze date for 8.1