public inbox for [email protected]
help / color / mirror / Atom feedRe: Define DatumGetInt8 function.
2+ messages / 2 participants
[nested] [flat]
* Re: Define DatumGetInt8 function.
@ 2026-01-06 11:49 David Rowley <[email protected]>
2026-01-06 14:12 ` Re: Define DatumGetInt8 function. Kirill Reshke <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: David Rowley @ 2026-01-06 11:49 UTC (permalink / raw)
To: Kirill Reshke <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-hackers
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? 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.
If you're not working on it, it would be good if you could withdraw
the patch from the commitfest.
David
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Define DatumGetInt8 function.
2026-01-06 11:49 Re: Define DatumGetInt8 function. David Rowley <[email protected]>
@ 2026-01-06 14:12 ` Kirill Reshke <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Kirill Reshke @ 2026-01-06 14:12 UTC (permalink / raw)
To: David Rowley <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-hackers
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-01-06 14:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 11:49 Re: Define DatumGetInt8 function. David Rowley <[email protected]>
2026-01-06 14:12 ` Kirill Reshke <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox