Add function to release an allocated SQLDA

From: "Kato, Sho" <kato-sho(at)jp(dot)fujitsu(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Add function to release an allocated SQLDA
Date: 2018-06-13 04:29:39
Message-ID: 25C1C6B2E7BE044889E4FE8643A58BA963A71BB2@G01JPEXMBKW03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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.

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;

The patch is attached.
The threads involved in this patch are as follows.


Kato Sho

Attachment Content-Type Size
Add-ECPGfreeSQLDA.patch application/octet-stream 15.4 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-06-13 04:48:50 Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"
Previous Message Tom Lane 2018-06-13 04:15:47 Re: why partition pruning doesn't work?