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 1jpIJE-0001dr-3S for pgsql-sql@arkaria.postgresql.org; Sat, 27 Jun 2020 21:24:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpIJD-0005Gs-0u for pgsql-sql@arkaria.postgresql.org; Sat, 27 Jun 2020 21:24:23 +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 1jpIJC-0005Gj-QU for pgsql-sql@lists.postgresql.org; Sat, 27 Jun 2020 21:24:22 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpIJ5-0007kb-Ay for pgsql-sql@lists.postgresql.org; Sat, 27 Jun 2020 21:24:22 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jpIJ3-0001kl-SJ; Sat, 27 Jun 2020 17:24:13 -0400 Date: Sat, 27 Jun 2020 17:24:13 -0400 From: Bruce Momjian To: Erik Brandsberg Cc: F Bax , pgsql-sql@lists.postgresql.org Subject: Re: pgsql function for roman2decimal? Message-ID: <20200627212413.GB16643@momjian.us> References: <20200627210157.GA16643@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Jun 27, 2020 at 05:14:27PM -0400, Erik Brandsberg wrote: > This really feels like something that should be part of a module and not the > core code. Well, we already do the numeric to Roman conversion, so doing the reverse seems to make sense: SELECT to_char(335, 'RN'); to_char ----------------- CCCXXXV -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee