Re: remove unneeded pstrdup in fetch_table_list

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: remove unneeded pstrdup in fetch_table_list
Date: 2021-01-14 05:10:55
Message-ID: X//SX4c9oyjIhFXb@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 14, 2021 at 01:17:57AM +0000, Hou, Zhijie wrote:
>>> Thanks. I am thinking to backpatch this even though there is no
>>> problem reported from any production system. What do you think?
>>
>> No objections from me.
>
> +1

text_to_cstring() indeed allocates a new string, so the extra
allocation is useless. FWIW, I don't see much point in poking at
the stable branches here.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-01-14 05:18:45 Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Previous Message Ashutosh Bapat 2021-01-14 04:56:16 Re: Fix typo about WalSndPrepareWrite