ECPG: FETCH ALL|n FROM cursor - Memory allocation?

Поиск
Список
Период
Сортировка
Искать
От
Lee Kindness
Тема
ECPG: FETCH ALL|n FROM cursor - Memory allocation?
Дата
Msg-id
15559.60296.332310.657745@kelvin.csl.co.uk
Список
Дерево обсуждения
Re: ECPG: FETCH ALL|n FROM cursor - Memory allocation? Christof Petig <christof@petig-baender.de>
Assuming the following fetch statement in embedded SQL/C:
EXEC SQL FETCH ALL IN selectFromTable_cur INTO:array1,:array2;

is memory automatically allocated (by experimentation I guess so)?
Should the input pointers be NULL initialised? How should the memory
be freed?

Assuming the following fetch statement:
while( 1 ){ EXEC SQL FETCH 1000 IN selectFromTable_cur INTO :array1, :array2; if( (sqlca.sqlcode < 0) || (sqlca.sqlcode != 0) )  break;}

is memory automatically allocated (by experimentation I guess so)?
Should the input pointers be NULL initialised before each fetch, or
only before the first one? How should the memory be freed?

Any pointers to useful documentation?

Thanks, Lee Kindness.

В списке pgsql-interfaces по дате отправления
От: Marc Zandvliet
Дата:
От: Michael Meskes
Дата:
FAQ