Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1moqvl-0005m3-D9 for pgsql-general@arkaria.postgresql.org; Sun, 21 Nov 2021 17:47:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1moqvk-0003fr-C1 for pgsql-general@arkaria.postgresql.org; Sun, 21 Nov 2021 17:47:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mop3f-0006ua-Vh for pgsql-general@lists.postgresql.org; Sun, 21 Nov 2021 15:47:12 +0000 Received: from sendmail.purelymail.com ([34.202.193.197]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mop3Z-0007b6-Cq for pgsql-general@lists.postgresql.org; Sun, 21 Nov 2021 15:47:11 +0000 DKIM-Signature: a=rsa-sha256; b=SfzDCBktu86lQ1REjdpwfaiMpmYbTOm+m0w6bnDnQ90xMC37TmVnM58RAcjoutWLqc4+bWqw3nnp0Wma7+KFfvtWv6LIJiC6NKoSbcUhJ5qTVJOu7w/Yy3v3DsHXg11qYC1NSDuAro9CL7b91QjJRa8sCJQRyqFCd5/PakcZJhxuoTg5NJnZs2JkBZbJhROEH11G5EV3+XG4nb3cQl47Xn+5w9wA8I3SXEma0JmxlRPJUkQ70BamKFYmdqGnrLfabEG3FmRyFGIZuuu/xnVp8LHg3ZFlgydMpPV+qDFB3M4OjguC2FyY9tEDcP8yIykQ2f+Gukb/hE9bd9z7Ed94Ug==; s=purelymail3; d=libremen.org; v=1; bh=Jkz/Se2xjyA+0pBqYjyqr72foJE9rgMzXCGqtE4XnAQ=; h=Received:From:To; DKIM-Signature: a=rsa-sha256; b=gYBmbDsp8yFiSXl+7+V3ZFXBqQDPAILdr1KXaWqzLw6jD2D15Pe+XxcV0xtUcDxuBagxlWsz1vMOW0IzgaGjkaVG9SAJdXVMPX8nxR8CX5BiT/cMmyhQLaDac8m8Gy080XucYUyvjlj6Hs/cgsVg3EzinHUyOaywDM7ObSVJZ8tY2fqbv4YB36FhB7t2FEikoVLwOf+1XNFuNktwh7vC28EiaVsWakOvwEuoP6upiFNuwoEWKJyPjDG1rWY65HLu70TyW/xZZGXn/hGDEMLr4I/IxT15hUrwknEudWn0ChmSum6l5DoYdoHHgu3O20o8WGYhP0tFwDpa97KVgZAkKA==; s=purelymail3; d=purelymail.com; v=1; bh=Jkz/Se2xjyA+0pBqYjyqr72foJE9rgMzXCGqtE4XnAQ=; h=Feedback-ID:Received:From:To; Feedback-ID: 2722:668:null:purelymail X-Pm-Original-To: pgsql-general@lists.postgresql.org Received: by ip-172-30-0-12.ec2.internal (JAMES SMTP Server ) with ESMTPA ID 1799633192 for ; Sun, 21 Nov 2021 15:46:50 +0000 (UTC) Date: Sun, 21 Nov 2021 16:46:48 +0100 From: "vincent.veyron@libremen.org" To: pgsql-general@lists.postgresql.org Subject: Re: insert column monetary type ver 2 Message-Id: <20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 20 Nov 2021 19:32:54 +0500 =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 =D0=98=D0=B2=D0=B0=D0=BD=D0=BE= =D0=B2 wrote: > I saw it. I=E2=80=99m not tied down hard on this type. It's just that it = exists and > I decided to include it in my development. Thanks. >=20 Consider storing integers; it's easy and fast, and all you need to do is di= splay your numbers divided by 100, using to_char() : select to_char(100001/100::numeric(10,2), '999G999D99'); to_char =20 ------------- 1=E2=80=AF000,01 -- https://marica.fr Logiciel de gestion des contentieux juridiques, des contrats et des sinistr= es d'assurance =09=09=09=09=09Bien =C3=A0 vous, Vincent Veyron