Replace some cstring_to_text to cstring_to_text_with_len

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Replace some cstring_to_text to cstring_to_text_with_len
Date: 2023-08-30 18:00:13
Message-ID: CAEudQArERPTuqgoAQux52M0d=CrNbwTzATx2Wuwnbct-8=G7SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

cstring_to_text has a small overhead, because call strlen for
pointer to char parameter.

Is it worth the effort to avoid this, where do we know the size of the
parameter?

best regards,
Ranier Vilela

Attachment Content-Type Size
0003-Avoid-unecessary-calls-to-strlen-function.patch application/octet-stream 7.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2023-08-30 19:04:46 Re: UUID v7
Previous Message Chapman Flack 2023-08-30 17:20:49 Re: More new SQL/JSON item methods