From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markur Sens <markursens@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P
Date: Sat, 11 Jun 2022 17:25:27 -0400
Message-ID: <3109893.1654982727@sss.pgh.pa.us> (raw)
In-Reply-To: <5C935137-83B0-4E61-BBEB-2D9D2840B8E9@gmail.com>
References: <CC37FB42-8BE2-43F6-A010-D61E439F4BA7@gmail.com>
<3105047.1654981562@sss.pgh.pa.us>
<5C935137-83B0-4E61-BBEB-2D9D2840B8E9@gmail.com>
Markur Sens <markursens@gmail.com> writes:
> On 12 Jun 2022, at 12:06 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> PG_GETARG_TEXT_PP is preferred in new code since it can avoid one
>> step of palloc-and-copy-the-value; the only real downside is you
>> have to use the appropriate macros to get the string's start address
>> and length.
> Is it worth adding a relevant comment in the documentation section?
It is documented in the source code where these macros are defined
(fmgr.h).
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, markursens@gmail.com
Subject: Re: PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P
In-Reply-To: <3109893.1654982727@sss.pgh.pa.us>
References: <CC37FB42-8BE2-43F6-A010-D61E439F4BA7@gmail.com> <3105047.1654981562@sss.pgh.pa.us> <5C935137-83B0-4E61-BBEB-2D9D2840B8E9@gmail.com> <3109893.1654982727@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox