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 1n595L-0001RZ-66 for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 16:24:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n595K-0006L7-2U for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 16:24:22 +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 1n595J-0006Ky-OZ for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 16:24:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n595H-0001z8-Dm for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 16:24:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 205GOGEs299858; Wed, 5 Jan 2022 11:24:16 -0500 From: Tom Lane To: Shaozhong SHI cc: pgsql-general Subject: Re: How best to create and use associative array type in Postgres? In-reply-to: References: <41274.1641394465@sss.pgh.pa.us> Comments: In-reply-to Shaozhong SHI message dated "Wed, 05 Jan 2022 16:11:28 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <299856.1641399856.1@sss.pgh.pa.us> Date: Wed, 05 Jan 2022 11:24:16 -0500 Message-ID: <299857.1641399856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Shaozhong SHI writes: > What do you think this attempt by using create type and create a function? > Managing Key/Value Pairs in PostgreSQL (justatheory.com) > The date alone should suggest to you that there might be better ways to do it by now. regards, tom lane