Re: [PATCH] Support casts from numeric to oid8

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com>
Subject: Re: [PATCH] Support casts from numeric to oid8
Date: 2026-11-25 08:44:06
Message-ID: 592B799A-4E24-49DB-A769-A1485C44B554@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 25 Nov 2026, at 09:33, Aleksander Alekseev <aleksander(at)tigerdata(dot)com> wrote:

>> I thought it was inconsistent that 9223372036854775807::oid8 works, but
>> 9223372036854775808::oid8 fails. Both values are within the range of oid8,
>> so I expected both casts to work. That's why I sent the patch.
>
> Then I wonder what could be the use case for the existing partial
> conversion. Perhaps instead of adding more casts we should remove the
> existing ones in order to make it consistent with xid8.

Historically we've been pretty careful about deprecating and removing
functionality which isn't blatantly broken, and this doesn't really fall in
that category IMO. That being said, I can't imagine what anyone would use it
for, and I agree that the proposed cast likely will be code only ever
excercised in a test suite.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2026-11-25 09:13:24 CYCLE over calculates windows functions
Previous Message Neil Chen 2026-11-25 08:37:56 Re: [PATCH] psql: Complete GRANTED BY in GRANT and REVOKE