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?  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-interfaces
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"
Дата:
Сообщение: help with integrating liblpq program
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: ECPG: FETCH ALL|n FROM cursor - Memory allocation?