Re: Replace some cstring_to_text to cstring_to_text_with_len

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replace some cstring_to_text to cstring_to_text_with_len
Date: 2023-08-31 11:06:42
Message-ID: CAEudQArgvOmO2wRBuJ=3RCfBQUZ=9aaB6-h_Fo+uLfdB6KnTQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qui., 31 de ago. de 2023 às 00:22, Michael Paquier <michael(at)paquier(dot)xyz>
escreveu:

> On Wed, Aug 30, 2023 at 03:00:13PM -0300, Ranier Vilela wrote:
> > 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?
>
> Are there workloads where this matters?
>
None, but note this change has the same spirit of 8b26769bc
<https://github.com/postgres/postgres/commit/8b26769bc441fffa8aad31dddc484c2f4043d2c9>
.

best regards,
Ranier Vilela

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-08-31 11:07:22 Re: Should we use MemSet or {0} for struct initialization?
Previous Message Alexander Lakhin 2023-08-31 11:00:00 Re: cataloguing NOT NULL constraints