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

From Ján Pecsők
Subject CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
Date
Msg-id CABNQVagu3bZGqiTjb31a8D5Od3fUMs7Oh3gmZMQZVHZ=uWWWfQ@mail.gmail.com
Whole thread Raw
Responses Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hello,

I report unexpected behaviour on version
PostgreSQL 13.3 on powerpc64le-unknown-linux-gnu, compiled by gcc (GCC) 6.4.1 20180131 (Advance-Toolchain-at10.0) [revision 257243], 64-bit

Where conversion from numeric (18,3) to numeric didnt work as expected.
Example

CREATE TABLE public.test_conversion (
    number_1       numeric(18,3) NOT NULL
)
;

create or replace view public.test_conversion_2
as
select
number_1::numeric      
from public.test_conversion

create table public.test_conversion_3 as select * from public.test_conversion_2
;

Expected behaviour is that  public.test_conversion_3 has one column of type numeric
Actual behaviour is that  public.test_conversion_3 has one column of type   numeric (18,3)

With best regards

Jan Pecsok




pgsql-bugs by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: BUG #16631: postgres_fdw tries to insert into generated columns
Next
From: Tom Lane
Date:
Subject: Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3