Re: SPI bug. - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: SPI bug.
Date
Msg-id thhal-043ZQA801yiclV0K8J/lYddZvovyXrx@mailblocks.com
Whole thread Raw
In response to Re: SPI bug.  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway wrote:
> Neil Conway wrote:
> 
>> I think changing SPI_cursor_fetch() and SPI_cursor_move() to take a 
>> "long" for the "count" parameter is the right fix for HEAD.
> 
> 
> Attached is a patch that implements this. A bunch of functions had to be 
> updated: SPI_execute(), SPI_execute_snapshot(), SPI_exec(), SPI_execp(), 
> SPI_execute_plan(), SPI_cursor_fetch(), and SPI_cursor_move().
> 
> I also updated PL/Python, which was invoking SPI_execute() with an `int' 
> parameter. PL/Tcl could be updated as well, but it seems the base Tcl 
> package doesn't provide a Tcl_GetLong() function. PL/Perl could also be 
> updated (plperl_spi_exec()), but I don't know XS, so I will leave that 
> to someone else.
> 
> Barring any objections, I'll apply this to HEAD tomorrow.
> 
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, wouldn't it be better to use 
something that is fixed in size here too? I.e. int32 or perhaps int64?

Regards,
Thomas Hallgren



pgsql-hackers by date:

Previous
From: Andrew - Supernews
Date:
Subject: Re: SPI bug.
Next
From: Neil Conway
Date:
Subject: Re: SPI bug.