Avoid possible useless call to makeNode function (src/backend/commands/view.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Avoid possible useless call to makeNode function (src/backend/commands/view.c)
Date: 2024-10-29 12:07:15
Message-ID: CAEudQAq=06YPWPhS+yyTbCwv5JLKRz8rm3dWx6JR5Uj_d_fQDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

With the function *DefineVirtualRelation* has a possible
useless call to *makeNode* function, which invokes palloc.

So, reduce the scope for the variable to inner else
where it is really necessary.

trivial patch attached.

best regards,
Ranier Vilela

Attachment Content-Type Size
0001-avoid-possible-useless-palloc-view.patch application/octet-stream 580 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2024-10-29 12:12:14 Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions
Previous Message Aleksander Alekseev 2024-10-29 12:01:10 [PATCH] Rename trim_array() for consistency with the rest of array_* functions