From: | Thomas Hallgren <thhal(at)mailblocks(dot)com> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SPI bug. |
Date: | 2005-05-01 13:49:19 |
Message-ID: | thhal-043ZQA801yiclV0K8J/lYddZvovyXrx@mailblocks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2005-05-01 14:02:25 | Re: SPI bug. |
Previous Message | Andrew - Supernews | 2005-05-01 12:40:19 | Re: SPI bug. |