Re: How to return a large String with C

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to return a large String with C
Дата
Msg-id 10383.1203257828@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to return a large String with C  (Stefan Niantschur <sniantschur@web.de>)
Ответы Re: How to return a large String with C
Re: How to return a large String with C
Список pgsql-general
Stefan Niantschur <sniantschur@web.de> writes:
> So far I have been successfully doing calls to SPI, select the data from the
> table and return it. However, this works only with string not larger than
> page size of char[8192].
> The strings I expect are much longer and this causes the backend to crash.

Hardly surprising when you're printing the string into a fixed-size 8K buffer.
The buffer overflow is smashing the stack, in particular the function's
return address.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: the feasibility of sending email from stored procedure in Postgres
Следующее
От: Colin Wetherbee
Дата:
Сообщение: Re: How to return a large String with C