Hello, I think that you could use another pattern where you init the PQExpBufferData structure instead of create it, so that only the string is malloced. In v26, I have the functions return PQExpBuffer. The two calling functions then free it, which should solve any leak. Yep, it works as well. Here's an addendum that does that. I can combine them in v27, but figured this was quicker. It works. However having just one full patch with a number would help so that I can say "ready to committer" or not on something. -- Fabien.
I think that you could use another pattern where you init the PQExpBufferData structure instead of create it, so that only the string is malloced. In v26, I have the functions return PQExpBuffer. The two calling functions then free it, which should solve any leak.
I think that you could use another pattern where you init the PQExpBufferData structure instead of create it, so that only the string is malloced.
Here's an addendum that does that. I can combine them in v27, but figured this was quicker.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных