Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
Date
Msg-id 2395471.1628180285@sss.pgh.pa.us
Whole thread Raw
In response to Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On Thu, 5 Aug 2021 at 02:35, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Although this changes no existing regression test results,
>> I'm still a bit hesitant to back-patch it, because I am not
>> real sure that nothing out there is depending on the current
>> behavior (which has stood for decades).  I think it'd be all
>> right to put into HEAD, and maybe it's not too late for v14.

> This isn't the first time someone has hit this [1]. The failing CTE
> query there is quite interesting because if ::varchar[] with no typmod
> wasn't a no-op, it could have been used to fix it. In fact, that's
> what the error message and hint suggest doing.

Hmm.  Jan's example isn't that compelling, since you could always
create the table manually with the desired column type.  However
the CTE application is more interesting, since there's no really
easy way to satisfy the type-matching rule there.  (You could
cast to the more restrictive typmod, but that might be the Wrong
Thing for your query.)

So maybe we should back-patch, but I still feel nervous about that.
Anybody else have an opinion here?

With one eye on the calendar, I'm thinking that if we do decide
to back-patch we should wait a week, rather than shoving this in
just before a release wrap.  OTOH, if it's v14 only it'd be better
to have it appear in beta3 rather than later.  Maybe we should
push to v14 now, and consider back-patch in a few months if there
are not complaints about beta3?

            regards, tom lane



pgsql-bugs by date:

Previous
From: vinay kumar
Date:
Subject: Re: BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #17134: pg_restore ERROR: operator does not exist: util.ltree = util.ltree