| От | Kato, Sho |
|---|---|
| Тема | Add function to release an allocated SQLDA |
| Дата | |
| Msg-id | 25C1C6B2E7BE044889E4FE8643A58BA963A71BB2@G01JPEXMBKW03 обсуждение исходный текст |
| Ответы |
Re: Add function to release an allocated SQLDA
|
| Список | pgsql-hackers |
Hi,
I add a function called ECPGfreeSQLDA() becasue there is no API for releasing the SQLDA stored the result set.
An example of usage is as follows.
Specify a pointer to sqlda_t to be released as an argument.
Example:
exec sql begin declare section;
char *stmt1 = "SELECT * FROM t1";
exec sql end declare section;
sqlda_t *outp_sqlda;
exec sql prepare st_id2 from :stmt1;
exec sql declare mycur2 cursor for st_id1;
exec sql open mycur2;
exec sql fetch all from mycur2 into descriptor outp_sqlda;
exec sql close mycur2;
exec sql deallocate prepare st_id2;
ECPGfreeSQLDA(outp_sqlda);
The patch is attached.
The threads involved in this patch are as follows.
https://www.postgresql.org/message-id/25C1C6B2E7BE044889E4FE8643A58BA963A42097@G01JPEXMBKW03
https://www.postgresql.org/message-id/flat/0A3221C70F24FB45833433255569204D1F8AD5D6@G01JPEXMBYT05#0A3221C70F24FB45833433255569204D1F8AD5D6@G01JPEXMBYT05
regards,
--
Kato Sho
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера