Add function to release an allocated SQLDA

Поиск
Список
Период
Сортировка
От Kato, Sho
Тема Add function to release an allocated SQLDA
Дата
Msg-id 25C1C6B2E7BE044889E4FE8643A58BA963A71BB2@G01JPEXMBKW03
обсуждение исходный текст
Ответы Re: Add function to release an allocated SQLDA  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: why partition pruning doesn't work?
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"