Re: SPI bug.
От | Thomas Hallgren |
---|---|
Тема | Re: SPI bug. |
Дата | |
Msg-id | thhal-043ZQA801yiclV0K8J/lYddZvovyXrx@mailblocks.com обсуждение исходный текст |
Ответ на | Re: SPI bug. (Neil Conway <neilc@samurai.com>) |
Список | 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 по дате отправления: