Re: Memory leak fix in psql

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Memory leak fix in psql
Дата
Msg-id 20220719162814.ipbkzxzba3i7ylpo@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Memory leak fix in psql  (Japin Li <japinli@hotmail.com>)
Ответы Re: Memory leak fix in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2022-07-19 21:08:53 +0800, Japin Li wrote:
> From b2bcc3a1bac67b8b414f2025607f8dd35e096289 Mon Sep 17 00:00:00 2001
> From: Japin Li <japinli@hotmail.com>
> Date: Tue, 19 Jul 2022 18:27:25 +0800
> Subject: [PATCH v2 1/1] Fix the memory leak in psql describe
> 
> ---
>  src/bin/psql/describe.c | 168 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 168 insertions(+)
> 
> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
> index 0ce38e4b4c..7a070a6cd0 100644
> --- a/src/bin/psql/describe.c
> +++ b/src/bin/psql/describe.c
> @@ -112,7 +112,10 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem)
>                                  "n.nspname", "p.proname", NULL,
>                                  "pg_catalog.pg_function_is_visible(p.oid)",
>                                  NULL, 3))
> +    {
> +        termPQExpBuffer(&buf);
>          return false;
> +    }
>  
>      appendPQExpBufferStr(&buf, "ORDER BY 1, 2, 4;");

Adding copy over copy of this same block doesn't seem great. Can we instead
add a helper for it or such?

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Log details for client certificate failures
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] Log details for client certificate failures