From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Lukas Fittl <lukas(at)fittl(dot)com>, Shaik Mohammad Mujeeb <mujeeb(dot)sk(at)zohocorp(dot)com>, ilyaevdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, mujeebskdev <mujeeb(dot)sk(dot)dev(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)kurilemu(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>, Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Subject: | Re: Add comment explaining why queryid is int64 in pg_stat_statements |
Date: | 2025-05-22 04:01:14 |
Message-ID: | aC6hilVZNyoSsS7D@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 22, 2025 at 02:36:38PM +1200, David Rowley wrote:
> You could argue that if it reduces the locations that need to be
> changed by using a typedef, then it's a win. But there are also
> negative aspects to typedefs that need to be considered. For me, those
> are the added level of indirection of code reading to actually who
> what type I'm working with. I personally dislike typedefs like
> "typedef PageHeaderData *PageHeader;" as they hide the fact I'm
> working with a pointer.
>
> I'm not outright objecting to the typedef for this. It's just I don't
> see it as a clear-cut improvement for this case.
Same opinion here. I am not quite clear what there is to gain in
hiding the query ID behind a typedef, or even apply that to the plan
ID.
I have added an open item about the plan ID part as it applies to v18,
adding the RMT in CC to get an opinion. If we cannot get a consensus
on all that, letting things as they are is still logically correct,
even with the -Wwarnings-format-signedness argument which is not
included by default currently.
Has somebody an opinion to offer?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2025-05-22 05:54:22 | Retiring some encodings? |
Previous Message | Zhijie Hou (Fujitsu) | 2025-05-22 03:00:21 | RE: Conflict detection for update_deleted in logical replication |