Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless) - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Date
Msg-id alpine.DEB.2.20.1703271631250.10424@lancre
Whole thread Raw
In response to Re: \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_dump emits ALTER TABLE ONLY partitioned_table
Next
From: Peter Eisentraut
Date:
Subject: Re: rename pg_log directory?