pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change internal queryid type from uint64 to int64
Date: Fri, 30 May 2025 11:00:27 +0000
Message-ID: <E1uKxTN-000iT8-2n@gemulon.postgresql.org> (raw)

Change internal queryid type from uint64 to int64

uint64 was perhaps chosen in cff440d36 as the type was uint32 prior to
that widening work.

Having this as uint64 doesn't make much sense and just adds the overhead of
having to remember that we always output this in its signed form.  Let's
remove that overhead.

The signed form output is seemingly required since we have no way to
represent the full range of uint64 in an SQL type.  We use BIGINT in places
like pg_stat_statements, which maps directly to int64.

The release notes "Source Code" section may want to mention this
adjustment as some extensions may wish to adjust their code.

Author: David Rowley <dgrowleyml@gmail.com>
Suggested-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/50cb0c8b-994b-48f9-a1c4-13039eb3536b@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c3eda50b0648005281c2a3cf95375708f8ef97fc

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 38 ++++++++++++-------------
src/backend/access/brin/brin.c                  |  2 +-
src/backend/access/nbtree/nbtsort.c             |  2 +-
src/backend/commands/explain.c                  |  8 ++----
src/backend/commands/vacuumparallel.c           |  2 +-
src/backend/nodes/gen_node_support.pl           |  5 ++++
src/backend/nodes/outfuncs.c                    |  6 ++++
src/backend/nodes/queryjumblefuncs.c            | 22 +++++++-------
src/backend/nodes/readfuncs.c                   |  6 ++++
src/backend/rewrite/rewriteHandler.c            |  2 +-
src/backend/tcop/postgres.c                     |  4 +--
src/backend/utils/activity/backend_status.c     | 12 ++++----
src/backend/utils/adt/pgstatfuncs.c             |  4 +--
src/include/nodes/parsenodes.h                  |  7 ++++-
src/include/nodes/plannodes.h                   |  2 +-
src/include/utils/backend_status.h              |  6 ++--
16 files changed, 73 insertions(+), 55 deletions(-)



Message-ID: <E1uKxTN-000iT8-2n@gemulon.postgresql.org>
Permalink:  ../E1uKxTN-000iT8-2n@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uKxTN-000iT8-2n@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Change internal queryid type from uint64 to int64
  In-Reply-To: <E1uKxTN-000iT8-2n@gemulon.postgresql.org>

* 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