Re: Proposal to adjust typmod argument on base UDT input functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal to adjust typmod argument on base UDT input functions
Date
Msg-id 1782006.1754630325@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal to adjust typmod argument on base UDT input functions  (Octavio Alvarez <octalpg@alvarezp.org>)
List pgsql-hackers
Octavio Alvarez <octalpg@alvarezp.org> writes:
> On 8/7/25 22:46, Tom Lane wrote:
>> I don't really see how we could accept this?  Wouldn't it break
>> every existing extension datatype that uses typmod?

> That was my first thought as well, but COPY sends the typmod directly 
> already, so if they support COPY, they should already be compatible.

COPY is not the same context.

I'm not averse to doing something here, because it's certainly a mess
as mentioned by the comment right above your proposed patch.  But this
patch looks like "let's break half the universe for the benefit of the
other half".  (And, given the shortage of prior complaints, that's
being very generous about the proportion of data types that would
benefit.)

I think the way to move forward here would be to invent an explicit
datatype property that controls what to do.  I'm too tired to think
through exactly what the definition of the property would be, but
I suspect it'd have something to do with whether implicit and explicit
coercion behaviors are supposed to differ.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Octavio Alvarez
Date:
Subject: Re: Proposal to adjust typmod argument on base UDT input functions
Next
From: shveta malik
Date:
Subject: Re: Issue with logical replication slot during switchover