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 1jpHxZ-00014F-Ju for pgsql-sql@arkaria.postgresql.org; Sat, 27 Jun 2020 21:02:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpHxY-0007y4-G4 for pgsql-sql@arkaria.postgresql.org; Sat, 27 Jun 2020 21:02:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpHxY-0007xw-9Q for pgsql-sql@lists.postgresql.org; Sat, 27 Jun 2020 21:02:00 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpHxW-0004le-6E for pgsql-sql@lists.postgresql.org; Sat, 27 Jun 2020 21:01:59 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jpHxV-0004U1-Hx; Sat, 27 Jun 2020 17:01:57 -0400 Date: Sat, 27 Jun 2020 17:01:57 -0400 From: Bruce Momjian To: F Bax Cc: pgsql-sql@lists.postgresql.org Subject: Re: pgsql function for roman2decimal? Message-ID: <20200627210157.GA16643@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 04:38:59PM -0400, F Bax wrote: > I found simple code for PHP to convert roman numeral to decimal here: > > https://stackoverflow.com/questions/6265596/ > how-to-convert-a-roman-numeral-to-integer-in-php   > > Can this be accomplished with a pgsql function? Someone worked on this in 2017 but it was never added due to lack of interest. I am sure it can be cleaned up and added to PG 14 if there is demand: https://www.postgresql.org/message-id/flat/CAGMVOduAJ9wKqJXBYnmFmEetKxapJxrG3afUwpbOZ6n_dWaUnA%40mail.gmail.com -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee