| От | Colin Wetherbee |
|---|---|
| Тема | Re: How to return a large String with C |
| Дата | |
| Msg-id | 47B849EF.7020709@denterprises.org обсуждение исходный текст |
| Ответ на | Re: How to return a large String with C (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Tom Lane wrote: > 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. He also uses the variable "i" in *both* parts of his nested loop. Stefan, you should probably pick up a C programming book before going too much further with this. Colin
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера