pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Ján Pecsők <jan.pecsok@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
Date: Thu, 05 Aug 2021 12:18:05 -0400
Message-ID: <2395471.1628180285@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCWcOOGcYwTV0pv2F0o07w+dL7A2JN88fq5U-K29i=Ls=A@mail.gmail.com>
References: <CABNQVagu3bZGqiTjb31a8D5Od3fUMs7Oh3gmZMQZVHZ=uWWWfQ@mail.gmail.com>
	<2352034.1628127322@sss.pgh.pa.us>
	<CAEZATCWcOOGcYwTV0pv2F0o07w+dL7A2JN88fq5U-K29i=Ls=A@mail.gmail.com>

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





view thread (8+ messages)  latest in thread

Message-ID: <2395471.1628180285@sss.pgh.pa.us>
Permalink:  ../2395471.1628180285@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2395471.1628180285@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, jan.pecsok@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
  In-Reply-To: <2395471.1628180285@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox