Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iL2Sb-0005UO-Ua for pgsql-general@arkaria.postgresql.org; Thu, 17 Oct 2019 09:52:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iL2Sa-0006tN-Mm for pgsql-general@arkaria.postgresql.org; Thu, 17 Oct 2019 09:52:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iL2Sa-0006tA-9M for pgsql-general@lists.postgresql.org; Thu, 17 Oct 2019 09:52:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iL2SY-00066f-0y for pgsql-general@postgresql.org; Thu, 17 Oct 2019 09:52:43 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9H9qdlF019997; Thu, 17 Oct 2019 05:52:39 -0400 From: Tom Lane To: Morris de Oryx cc: pgsql-general Subject: Re: Has there been any discussion of custom dictionaries being defined in the database? In-reply-to: References: <19354.1571301238@sss.pgh.pa.us> Comments: In-reply-to Morris de Oryx message dated "Thu, 17 Oct 2019 20:33:41 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19759.1571305959.1@sss.pgh.pa.us> Date: Thu, 17 Oct 2019 11:52:39 +0200 Message-ID: <19760.1571305959@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Morris de Oryx writes: > Given that Amazon is bragging this week about turning off Oracle, it seems > like they could kick some resources towards contributing something to the > Postgres project. With that in mind, is the idea of defining dictionaries > within a table somehow meritless, or unexpectedly difficult? Well, it'd just be totally different. I don't think anybody cares to provide two separate definitions of common dictionaries (which'd have to somehow be kept in sync). As for why we did it with external text files in the first place --- for at least some of the dictionary types, the point is that you can drop in data files that are available from upstream sources, without any modification. Getting the same info into a table would require some nonzero amount of data transformation. Having said that ... in the end a dictionary is really just a set of functions implementing the dictionary API; where they get their data from is their business. So in theory you could roll your own dictionary that gets its data out of a table. But the dictionary API would be pretty hard to implement except in C, and I bet RDS doesn't let you install your own C functions either :-( regards, tom lane