public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kirill Reshke <[email protected]>
To: David Rowley <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Define DatumGetInt8 function.
Date: Tue, 6 Jan 2026 19:12:33 +0500
Message-ID: <CALdSSPjmukA1WGyYVqJMPD8080Rm9oXPVLn5T64xFCj6wKAenQ@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvoShMiWPSkV8zE3tu7uo9GEmuoe=gTpM0+GfOFh2iDmmw@mail.gmail.com>
References: <CALdSSPhFyb9qLSHee73XtZm1CBWJNo9+JzFNf-zUEWCRW5yEiQ@mail.gmail.com>
<[email protected]>
<CALdSSPg6UgK+6LJmFQ6G3av4J6dbngN7=QwQEuFZApnpmXgVWQ@mail.gmail.com>
<CAApHDvoShMiWPSkV8zE3tu7uo9GEmuoe=gTpM0+GfOFh2iDmmw@mail.gmail.com>
On Tue, 6 Jan 2026 at 16:50, David Rowley <[email protected]> wrote:
>
> On Tue, 30 Dec 2025 at 05:01, Kirill Reshke <[email protected]> wrote:
> > Well, OK. Removal is also fine for me, because it is at least consistent.
>
> Kirill, are you working on this patch?
Hi!
Yes, PFA.
> I've not studied in detail,
> but looks like it would require making
> char_decrement()/char_increment() and btcharskipsupport() all use
> CharGetDatum()/DatumGetChar() and switch to using SCHAR_MIN/SCHAR_MAX
> rather than 0/UCHAR_MAX.
This is also a possible change, and can be a separate patch. I will
try to also work on this this week.
--
Best regards,
Kirill Reshke
Attachments:
[application/octet-stream] v1-0001-Remove-Int8GetDatum-function.patch (871B, 2-v1-0001-Remove-Int8GetDatum-function.patch)
download | inline diff:
From 3c1447752d086932e9379d5866a995911e88760b Mon Sep 17 00:00:00 2001
From: reshke <[email protected]>
Date: Tue, 6 Jan 2026 14:03:49 +0000
Subject: [PATCH v1] Remove Int8GetDatum function.
We have no uses of Int8GetDatum in our tree and
did not have for a long time (or never).
Suggested-by: Tom Lane <[email protected]>
---
src/include/postgres.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 9268e6832cc..6423c87c64e 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -134,16 +134,6 @@ CharGetDatum(char X)
return (Datum) X;
}
-/*
- * Int8GetDatum
- * Returns datum representation for an 8-bit integer.
- */
-static inline Datum
-Int8GetDatum(int8 X)
-{
- return (Datum) X;
-}
-
/*
* DatumGetUInt8
* Returns 8-bit unsigned integer value of a datum.
--
2.43.0
view thread (2+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Define DatumGetInt8 function.
In-Reply-To: <CALdSSPjmukA1WGyYVqJMPD8080Rm9oXPVLn5T64xFCj6wKAenQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox