Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tU9wA-00EZXM-CL for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jan 2025 19:35:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tU9w8-00Cq84-8C for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jan 2025 19:35:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tU9w7-00Cq7w-R2 for pgsql-hackers@lists.postgresql.org; Sat, 04 Jan 2025 19:35:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tU9w5-0025th-0m for pgsql-hackers@lists.postgresql.org; Sat, 04 Jan 2025 19:35:50 +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 504JZloP647220; Sat, 4 Jan 2025 14:35:47 -0500 From: Tom Lane To: Michel Pelletier cc: Pavel Stehule , pgsql-hackers@lists.postgresql.org Subject: Re: Using Expanded Objects other than Arrays from plpgsql In-reply-to: References: <1342498.1729444411@sss.pgh.pa.us> <1445998.1729482404@sss.pgh.pa.us> <2062830.1729625620@sss.pgh.pa.us> <2265411.1729699470@sss.pgh.pa.us> <2354718.1729737539@sss.pgh.pa.us> <2581216.1729794746@sss.pgh.pa.us> <1948345.1730500073@sss.pgh.pa.us> <3797606.1732045516@sss.pgh.pa.us> Comments: In-reply-to Michel Pelletier message dated "Sat, 04 Jan 2025 08:37:39 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <647218.1736019347.1@sss.pgh.pa.us> Date: Sat, 04 Jan 2025 14:35:47 -0500 Message-ID: <647219.1736019347@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michel Pelletier writes: > I've circled back on this task to do some work improving the skeleton code, > but going back through our thread I landed on this point Tom made about > usefulness vs pure skeleton and my natural desire is to make a simple > expanded object that is also useful, so I brainstormed a bit and decided to > try something relatively simple but also (IMO) quite useful, an expanded > datum that wraps sqlite's serialize/derserialize API: > https://github.com/michelp/postgres-sqlite I think the odds that we'd accept a module with a dependency on sqlite are negligible. It's too big of a build dependency for too little return. Also, I'm sure that a module defined like that would be a pretty poor example/starting point for other expanded-object applications: there'd be too many aspects that have only to do with interfacing to sqlite, making it hard to see the expanded-object forest for the sqlite trees. I have to admit though that the forest-v-trees aspect makes it fairly hard to think of any suitable example module that would serve much real-world purpose. Likely scenarios for expanded objects just have a lot of functionality in them. For instance, I thought for a moment of suggesting that teaching contrib/hstore to work with expanded representations of hstores could be useful. But I'd forgotten how much functionality that type has. It'd be a big project and would still have a lot of baggage. regards, tom lane