pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: vincent.veyron@libremen.org <vincent.veyron@libremen.org>
To: pgsql-general@lists.postgresql.org
Subject: Re: insert column monetary type ver 2
Date: Sun, 21 Nov 2021 16:46:48 +0100
Message-ID: <20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org> (raw)
In-Reply-To: <CAPL5KHptRf_YF160RgOyoTx4g_ZcbR3jMQF7_Nd_pbLUXQQ_gw@mail.gmail.com>
References: <CAPL5KHpHSCXzB+yX4dDqKBRTtkx+M0rY7_Fc8NJnvVDw9E-iww@mail.gmail.com>
	<CAFp7Qwpv+5wOba56eycJRodLQXLPFAOCc9ChfWoFMu6eYRdbOA@mail.gmail.com>
	<CAPL5KHptRf_YF160RgOyoTx4g_ZcbR3jMQF7_Nd_pbLUXQQ_gw@mail.gmail.com>

On Sat, 20 Nov 2021 19:32:54 +0500
Дмитрий Иванов <firstdismay@gmail.com> wrote:

> I saw it. I’m not tied down hard on this type. It's just that it exists and
> I decided to include it in my development. Thanks.
> 


Consider storing integers; it's easy and fast, and all you need to do is display your numbers divided by 100, using to_char() :

select to_char(100001/100::numeric(10,2), '999G999D99');
   to_char   
-------------
    1 000,01


--
https://marica.fr
Logiciel de gestion des contentieux juridiques, des contrats et des sinistres d'assurance
					Bien à vous, Vincent Veyron





view thread (21+ messages)  latest in thread

Message-ID: <20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org>
Permalink:  ../20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org/
Also on:    postgresql.org/message-id/20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: vincent.veyron@libremen.org
  Subject: Re: insert column monetary type ver 2
  In-Reply-To: <20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org>
  References: <CAPL5KHpHSCXzB+yX4dDqKBRTtkx+M0rY7_Fc8NJnvVDw9E-iww@mail.gmail.com> <CAFp7Qwpv+5wOba56eycJRodLQXLPFAOCc9ChfWoFMu6eYRdbOA@mail.gmail.com> <CAPL5KHptRf_YF160RgOyoTx4g_ZcbR3jMQF7_Nd_pbLUXQQ_gw@mail.gmail.com> <20211121164648.2f33e0dfc9f5b39438df9caa@libremen.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox