Precision/scale of a numeric attribute of a new data type are nothandled correctly when the type is returned by a function

Поиск
Список
Период
Сортировка
От Petr Fedorov
Тема Precision/scale of a numeric attribute of a new data type are nothandled correctly when the type is returned by a function
Дата
Msg-id b2dbfbd0-8f12-4cca-a0b5-9ee3f00385b4@phystech.edu
обсуждение исходный текст
Ответы Re: Precision/scale of a numeric attribute of a new data type are not handled correctly when the type is returned by a function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hello,

Steps to reproduce:


create type public.test_type as (  value1 numeric(35,6),     value2
numeric(35,6) );

create or replace function public.test(    )    returns test_type   
language  'sql'  as $body$   select 7.136178319899999964,
7.136178319899999964;  $body$;


select value1, value2 from test();

Expected:  7.136178 7.136178

Actual:  7.136178319899999964 7.136178319899999964


select value1::numeric(35,6), value2::numeric(35,2) from test();

Expected:  7.136178 7.14

Actual: 7.136178319899999964 7.14


I'm on Centos 7,  Postgresql 11.6



   





В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16134: Assertion fails on CREATE gist INDEX over intarray
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16134: Assertion fails on CREATE gist INDEX over intarray