From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: More CppAsString2() in psql's describe.c |
Date: | 2024-11-28 19:18:22 |
Message-ID: | A551C0EA-9CBB-44DB-94D7-3B4F6456DF91@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 28 Nov 2024, at 19:25, Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:
>> LGTM, I didn't scan for omissions but the ones in the patch look right to me.
>> I sort of wish we had a shorter macro as CppAsString2() get's pretty verbose
>> when used frequently like this.
>
> I don't quite understand the etymology of the name (it's some variation on C++'s std::to_string, plus...something), but if I did, I'd probably find the name less icky.
AFAIK, Cpp stands for "C Pre Processor" as it is a preprocessor expansion into
a string, and the 2 is simply because CppAsString2() calls CppAsString(). The
reason for the call is perform macro expansion before converting to string.
I agree that it's not icky, it just get's very verbose as opposed how
translation of strings is done with _(<string>) as an example.
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Gavrilov | 2024-11-28 19:20:42 | Re: Truncate logs by max_log_size |
Previous Message | Alena Rybakina | 2024-11-28 19:08:51 | Re: POC, WIP: OR-clause support for indexes |