Re: SPI bug.

From: Neil Conway <neilc(at)samurai(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SPI bug.
Date: 2005-05-01 14:02:25
Message-ID: 4274E171.8010407@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-05-01 14:25:54 Re: Feature freeze date for 8.1
Previous Message Thomas Hallgren 2005-05-01 13:49:19 Re: SPI bug.