CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3

From: Ján Pecsők <jan(dot)pecsok(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
Date: 2021-08-04 15:15:42
Message-ID: CABNQVagu3bZGqiTjb31a8D5Od3fUMs7Oh3gmZMQZVHZ=uWWWfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-08-05 01:35:22 Re: CAST from numeric(18,3) to numeric doesnt work, posgresql 13.3
Previous Message Etsuro Fujita 2021-08-04 08:30:44 Re: BUG #16631: postgres_fdw tries to insert into generated columns