{"id":465720,"date":"2025-07-02T21:00:16","date_gmt":"2025-07-02T21:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=465720"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=465720","title":{"rendered":"<span>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 PostgreSQL<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 PostgreSQL.<\/p>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438:<\/p>\n<p>1) <strong>float4<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c real, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float(1..24) <\/p>\n<p>2) <strong>float8<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float, \u0441\u0438\u043d\u043e\u043d\u0438\u043c double precision, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float(25..53) <\/p>\n<p>3) <strong>numeric<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c decimal. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439: 131072 \u0446\u0438\u0444\u0440 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0438 16383 \u0446\u0438\u0444\u0440 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c numeric(\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043c\u0430\u0441\u0448\u0442\u0430\u0431), \u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 1000. numeric \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043e\u043c: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432, \u0441\u043e\u0442\u0435\u043d, \u0442\u044b\u0441\u044f\u0447.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0447\u0438\u0441\u0435\u043b \u0438 null \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity, -Infinity, NaN.<\/p>\n<p>\u041f\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0442\u0435\u0441\u043d\u044f\u0442\u044c\u0441\u044f \u0432 TOSAT-\u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b (numeric) \u043c\u043e\u0433\u0443\u0442.<\/p>\n<p>float4 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>6<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 (\u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f), float8 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>15<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">select 12345678901234567890123456789.1234567890123456789::float4::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12345700000000000000000000000 (1 row) select 12345678901234567890123456789.1234567890123456789::float8::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12345678901234600000000000000 (1 row)<\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d70\/8f4\/893\/d708f48932ddec6a97c2dfd59036cb0a.png\" alt=\"\" title=\"\" width=\"951\" height=\"557\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d70\/8f4\/893\/d708f48932ddec6a97c2dfd59036cb0a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d70\/8f4\/893\/d708f48932ddec6a97c2dfd59036cb0a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0448\u0435\u0441\u0442\u043e\u0439 \u0438 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044b\u0439 \u0440\u0430\u0437\u0440\u044f\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u044b. \u0412 \u0442\u043e\u043c \u0436\u0435 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0435\u0441\u0442\u043e\u0433\u043e \u0438 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0443\u043b\u044f\u043c\u0438, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0442\u0438\u043f\u043e\u0432 float4 \u0438 float8 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0443\u043b\u044f:<\/p>\n<pre><code class=\"sql\">select (12345678901234567890123456789.1234567890123456789::float8 + 123456789::float8)::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- 12345678901234600000000000000 (1 row)<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>123456789::float8<\/strong> \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0443\u043b\u044f.<\/p>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a numeric \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">select 1234567890123456789.123456789::numeric + 0.00000000000000000000123456789::numeric as numeric;                       numeric                       ---------------------------------------------------  1234567890123456789.12345678900000000000123456789 (1 row)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 float \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043b\u043e\u0445\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0451\u0442\u0430 \u0441\u0430\u043c\u043e\u043b\u0451\u0442\u0430, \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u043b\u0451\u0442 \u043f\u0440\u0438\u0437\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u0430, \u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0451\u0442\u0435 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430. <\/p>\n<p>\u041f\u0440\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0438 float8 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044b\u0439 \u0440\u0430\u0437\u0440\u044f\u0434:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/093\/b96\/ccd\/093b96ccde050806f9e1c7c5e36ab1f6.png\" alt=\"\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 float8\" title=\"\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 float8\" width=\"1077\" height=\"593\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/093\/b96\/ccd\/093b96ccde050806f9e1c7c5e36ab1f6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/093\/b96\/ccd\/093b96ccde050806f9e1c7c5e36ab1f6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 float8<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 extra_float_digits <\/strong><\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c extra_float_digits\u00a0\u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0446\u0438\u0444\u0440 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u0435\u043b float8, float4 \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432.\u00a0\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 -15 \u0434\u043e 3 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/p>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1,2,3 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u0438\u043f\u0443 numeric\u00a0\u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 <\/p>\n<p>\u0412\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 float8, float4 \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 extra_float_digits\u00a0 1,2,3 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b:<\/p>\n<pre><code class=\"sql\">show extra_float_digits; 1 select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1234567  |      1.1234568 (1 row) set extra_float_digits = 3; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1234567  |      1.1234568 (1 row) <\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u043b\u044c \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u0431\u0438\u0440\u0430\u044e\u0442 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u0440\u0430\u0437\u0440\u044f\u0434\u044b<strong> \u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c<\/strong>:<\/p>\n<pre><code class=\"sql\">set extra_float_digits = 0; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.12346    |      1.12346 (1 row) set extra_float_digits = -1; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1235     |      1.1235 (1 row) set extra_float_digits = -2; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.123      |      1.123 (1 row) set extra_float_digits = -5; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890          |      1 (1 row) <\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 extra_float_digits \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0432\u043e\u0434). \u041d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u0438\u043f\u0443 numeric \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442:<\/p>\n<pre><code class=\"sql\">select 1234567890.123456789::float8::numeric, 1.123456789::float4::numeric;       float8               |      float4        ---------------------------+--------------------        1234567890.12346    |               1.12346 (1 row)<\/code><\/pre>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0431\u0440\u0430\u0442\u044c <strong>\u043c\u043d\u043e\u0433\u043e<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432:<\/p>\n<pre><code class=\"sql\">reset extra_float_digits;  select 234567890.199999989::float8::numeric, 1.19999999123::float4::numeric;       float8               |      float4        ---------------------------+--------------------        234567890.2         |              1.2 (1 row) <\/code><\/pre>\n<p><strong>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <\/strong><\/p>\n<p>\u0422\u0438\u043f numeric \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0438 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435, \u0447\u0435\u043c float8 : \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c 15 &#171;\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432&#187;, \u0446\u0438\u0444\u0440 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0446\u0438\u0444\u0440 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0443\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0435 \u0438 \u043f\u043e\u0442\u043e\u043c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/076\/dec\/397\/076dec3975edf6583f7edb6eb13cac7b.png\" alt=\"\u0426\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u044f \u0442\u0440\u0451\u0445 \u0442\u0438\u043f\u043e\u0432\" title=\"\u0426\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u044f \u0442\u0440\u0451\u0445 \u0442\u0438\u043f\u043e\u0432\" width=\"997\" height=\"429\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/076\/dec\/397\/076dec3975edf6583f7edb6eb13cac7b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/076\/dec\/397\/076dec3975edf6583f7edb6eb13cac7b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0426\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u044f \u0442\u0440\u0451\u0445 \u0442\u0438\u043f\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u043e\u043b\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u044f\u043c\u0438 \u043c\u0435\u0441\u0442\u043e: <\/p>\n<pre><code class=\"sql\">select pg_column_size(c1), pg_column_size(c2), pg_column_size(c3) from t5;  pg_column_size | pg_column_size | pg_column_size  ----------------+----------------+----------------               8 |              4 |              5               8 |              4 |             13               8 |              4 |              5               8 |              4 |              7<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity NaN -Infinity. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">truncate t5; insert into t5 values ('Infinity', 'Infinity', 'Infinity'); insert into t5 values ('NaN', 'NaN', 'NaN'); select * from t5;     c1    |    c2    |    c3     ----------+----------+----------  Infinity | Infinity | Infinity       NaN |      NaN |      NaN (2 rows) select lp_off, lp_len, t_hoff, t_data from heap_page_items(get_raw_page('t5','main',0)) order by lp_off;  lp_off | lp_len | t_hoff |              t_data               --------+--------+--------+----------------------------------    8096 |     39 |     24 | \\x000000000000f87f0000c07f0700c0    8136 |     39 |     24 | \\x000000000000f07f0000807f0700d0 (2 rows) <\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f numeric <\/strong><\/p>\n<p>\u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric:<\/p>\n<p>1) \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 16 \u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0445 \u0446\u0438\u0444\u0440, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c float8<\/p>\n<p>2) \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u0414\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<pre><code class=\"sql\">insert into t5 values (1,1, 1.000000000000000000000000000000000001\/3);  select lp, lp_off, lp_len, t_hoff, t_data from heap_page_items(get_raw_page('t5','main',0))  order by lp desc limit 1;  lp | lp_off | lp_len | t_hoff |                  t_data  ----+--------+--------+--------+-----------------------------------   5 |   7912 |     57 |     24 | \\x000000000000f03f0000803f2b7f92050d050d050d050d050d050d050d050d060d  (5 rows) select * from t5 order by ctid desc limit 1;  c1 | c2 |                   c3                    ----+----+---------------------------------------   1 |  1 | 0.333333333333333333333333333333333334 <\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a79\/593\/1c8\/a795931c83333118d8a58784fb28d2db.png\" alt=\"\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 PostgteSQL\" title=\"\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 PostgteSQL\" width=\"1003\" height=\"391\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a79\/593\/1c8\/a795931c83333118d8a58784fb28d2db.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a79\/593\/1c8\/a795931c83333118d8a58784fb28d2db.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 PostgteSQL<\/figcaption><\/div>\n<\/figure>\n<p>\u00a0<strong>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u00a0\u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c numeric, \u0430 \u043d\u0435 float4 \u0438 float8<strong>. <\/strong>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e numeric \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e, \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u043b\u044f numeric \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430, \u0447\u0435\u043c \u0442\u0438\u043f\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 numeric \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 16 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0443 float8. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u0438 float4 (real) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e: \u0432\u0441\u0435\u0433\u043e 6 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity NaN -Infinity.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/924378\/\"> https:\/\/habr.com\/ru\/articles\/924378\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 PostgreSQL.<\/p>\n<p>\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438:<\/p>\n<p>1) <strong>float4<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c real, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float(1..24) <\/p>\n<p>2) <strong>float8<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float, \u0441\u0438\u043d\u043e\u043d\u0438\u043c double precision, \u0441\u0438\u043d\u043e\u043d\u0438\u043c float(25..53) <\/p>\n<p>3) <strong>numeric<\/strong>, \u0441\u0438\u043d\u043e\u043d\u0438\u043c decimal. \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439: 131072 \u0446\u0438\u0444\u0440 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0438 16383 \u0446\u0438\u0444\u0440 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c numeric(\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043c\u0430\u0441\u0448\u0442\u0430\u0431), \u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 1000. numeric \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043e\u043c: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432, \u0441\u043e\u0442\u0435\u043d, \u0442\u044b\u0441\u044f\u0447.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0447\u0438\u0441\u0435\u043b \u0438 null \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity, -Infinity, NaN.<\/p>\n<p>\u041f\u043e\u043b\u044f \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0442\u0435\u0441\u043d\u044f\u0442\u044c\u0441\u044f \u0432 TOSAT-\u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b (numeric) \u043c\u043e\u0433\u0443\u0442.<\/p>\n<p>float4 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>6<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 (\u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f), float8 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c <strong>15<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437\u0440\u044f\u0434 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">select 12345678901234567890123456789.1234567890123456789::float4::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12345700000000000000000000000 (1 row) select 12345678901234567890123456789.1234567890123456789::float8::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12345678901234600000000000000 (1 row)<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0448\u0435\u0441\u0442\u043e\u0439 \u0438 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044b\u0439 \u0440\u0430\u0437\u0440\u044f\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u044b. \u0412 \u0442\u043e\u043c \u0436\u0435 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0435\u0441\u0442\u043e\u0433\u043e \u0438 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0443\u043b\u044f\u043c\u0438, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0442\u0438\u043f\u043e\u0432 float4 \u0438 float8 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0443\u043b\u044f:<\/p>\n<pre><code class=\"sql\">select (12345678901234567890123456789.1234567890123456789::float8 + 123456789::float8)::numeric; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 numeric ------------------------------- 12345678901234600000000000000 (1 row)<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>123456789::float8<\/strong> \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0443\u043b\u044f.<\/p>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a numeric \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">select 1234567890123456789.123456789::numeric + 0.00000000000000000000123456789::numeric as numeric;                       numeric                       ---------------------------------------------------  1234567890123456789.12345678900000000000123456789 (1 row)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 float \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043b\u043e\u0445\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0451\u0442\u0430 \u0441\u0430\u043c\u043e\u043b\u0451\u0442\u0430, \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u043b\u0451\u0442 \u043f\u0440\u0438\u0437\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u0430, \u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0451\u0442\u0435 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430. <\/p>\n<p>\u041f\u0440\u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0438 float8 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044b\u0439 \u0440\u0430\u0437\u0440\u044f\u0434:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 float8<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 extra_float_digits <\/strong><\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c extra_float_digits\u00a0\u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0446\u0438\u0444\u0440 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u0435\u043b float8, float4 \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432.\u00a0\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 -15 \u0434\u043e 3 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/p>\n<p>\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1,2,3 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u0438\u043f\u0443 numeric\u00a0\u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 <\/p>\n<p>\u0412\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 float8, float4 \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 extra_float_digits\u00a0 1,2,3 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b:<\/p>\n<pre><code class=\"sql\">show extra_float_digits; 1 select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1234567  |      1.1234568 (1 row) set extra_float_digits = 3; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1234567  |      1.1234568 (1 row) <\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u043b\u044c \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u0431\u0438\u0440\u0430\u044e\u0442 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u0440\u0430\u0437\u0440\u044f\u0434\u044b<strong> \u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c<\/strong>:<\/p>\n<pre><code class=\"sql\">set extra_float_digits = 0; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.12346    |      1.12346 (1 row) set extra_float_digits = -1; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.1235     |      1.1235 (1 row) set extra_float_digits = -2; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890.123      |      1.123 (1 row) set extra_float_digits = -5; select 1234567890.123456789::float8, 1.123456789::float4;       float8               |      float4        ---------------------------+--------------------        1234567890          |      1 (1 row) <\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 extra_float_digits \u0432\u043b\u0438\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0432\u043e\u0434). \u041d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u0438\u043f\u0443 numeric \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442:<\/p>\n<pre><code class=\"sql\">select 1234567890.123456789::float8::numeric, 1.123456789::float4::numeric;       float8               |      float4        ---------------------------+--------------------        1234567890.12346    |               1.12346 (1 row)<\/code><\/pre>\n<p>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0431\u0440\u0430\u0442\u044c <strong>\u043c\u043d\u043e\u0433\u043e<\/strong> \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432:<\/p>\n<pre><code class=\"sql\">reset extra_float_digits;  select 234567890.199999989::float8::numeric, 1.19999999123::float4::numeric;       float8               |      float4        ---------------------------+--------------------        234567890.2         |              1.2 (1 row) <\/code><\/pre>\n<p><strong>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b <\/strong><\/p>\n<p>\u0422\u0438\u043f numeric \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0438 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435, \u0447\u0435\u043c float8 : \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c 15 &#171;\u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432&#187;, \u0446\u0438\u0444\u0440 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0446\u0438\u0444\u0440 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0443\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0435 \u0438 \u043f\u043e\u0442\u043e\u043c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0426\u0432\u0435\u0442\u043e\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u044f \u0442\u0440\u0451\u0445 \u0442\u0438\u043f\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u043e\u043b\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u044f\u043c\u0438 \u043c\u0435\u0441\u0442\u043e: <\/p>\n<pre><code class=\"sql\">select pg_column_size(c1), pg_column_size(c2), pg_column_size(c3) from t5;  pg_column_size | pg_column_size | pg_column_size  ----------------+----------------+----------------               8 |              4 |              5               8 |              4 |             13               8 |              4 |              5               8 |              4 |              7<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity NaN -Infinity. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">truncate t5; insert into t5 values ('Infinity', 'Infinity', 'Infinity'); insert into t5 values ('NaN', 'NaN', 'NaN'); select * from t5;     c1    |    c2    |    c3     ----------+----------+----------  Infinity | Infinity | Infinity       NaN |      NaN |      NaN (2 rows) select lp_off, lp_len, t_hoff, t_data from heap_page_items(get_raw_page('t5','main',0)) order by lp_off;  lp_off | lp_len | t_hoff |              t_data               --------+--------+--------+----------------------------------    8096 |     39 |     24 | \\x000000000000f87f0000c07f0700c0    8136 |     39 |     24 | \\x000000000000f07f0000807f0700d0 (2 rows) <\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f numeric <\/strong><\/p>\n<p>\u0420\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric:<\/p>\n<p>1) \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 16 \u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0445 \u0446\u0438\u0444\u0440, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c float8<\/p>\n<p>2) \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e. \u0414\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<pre><code class=\"sql\">insert into t5 values (1,1, 1.000000000000000000000000000000000001\/3);  select lp, lp_off, lp_len, t_hoff, t_data from heap_page_items(get_raw_page('t5','main',0))  order by lp desc limit 1;  lp | lp_off | lp_len | t_hoff |                  t_data  ----+--------+--------+--------+-----------------------------------   5 |   7912 |     57 |     24 | \\x000000000000f03f0000803f2b7f92050d050d050d050d050d050d050d050d060d  (5 rows) select * from t5 order by ctid desc limit 1;  c1 | c2 |                   c3                    ----+----+---------------------------------------   1 |  1 | 0.333333333333333333333333333333333334 <\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0432 PostgteSQL<\/figcaption><\/div>\n<\/figure>\n<p>\u00a0<strong>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u00a0\u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c numeric, \u0430 \u043d\u0435 float4 \u0438 float8<strong>. <\/strong>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e numeric \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e, \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u043b\u044f numeric \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430, \u0447\u0435\u043c \u0442\u0438\u043f\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 numeric \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 16 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0443 float8. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u0438 float4 (real) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e: \u0432\u0441\u0435\u0433\u043e 6 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Infinity NaN -Infinity.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/924378\/\"> https:\/\/habr.com\/ru\/articles\/924378\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-465720","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=465720"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465720\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}