Re: Add comment explaining why queryid is int64 in pg_stat_statements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add comment explaining why queryid is int64 in pg_stat_statements
Date
Msg-id aC6hilVZNyoSsS7D@paquier.xyz
Whole thread Raw
In response to Re: Add comment explaining why queryid is int64 in pg_stat_statements  (Peter Eisentraut <peter@eisentraut.org>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Conflict detection for update_deleted in logical replication
Next
From: Shubhankar Anand Kulkarni
Date:
Subject: Expression push down from Join Node to below node.