Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBP7v-0007wz-Rs for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Apr 2018 18:26:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBP7t-00055z-MU for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Apr 2018 18:26:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBP7t-00055o-Bo for pgsql-hackers@lists.postgresql.org; Wed, 25 Apr 2018 18:26:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBP7n-0001vC-V4 for pgsql-hackers@postgresql.org; Wed, 25 Apr 2018 18:26:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w3PIQZ6o009427; Wed, 25 Apr 2018 14:26:35 -0400 From: Tom Lane To: John Naylor cc: Andrew Dunstan , Stas Kelvich , PostgreSQL Hackers Subject: Re: unused_oids script is broken with bsd sed In-reply-to: References: <37D774E4-FE1F-437E-B3D2-593F314B7505@postgrespro.ru> <34a54c54-9132-1254-2bc3-d3489fb79728@2ndQuadrant.com> <4473.1524665917@sss.pgh.pa.us> Comments: In-reply-to John Naylor message dated "Thu, 26 Apr 2018 01:14:08 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9425.1524680795.1@sss.pgh.pa.us> Date: Wed, 25 Apr 2018 14:26:35 -0400 Message-ID: <9426.1524680795@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk John Naylor writes: > On 4/25/18, Tom Lane wrote: >> I think we should rewrite >> both of them to use the Catalog.pm infrastructure. > If we're going to use Catalog.pm for that, it seems more convenient to > expose toast and index oids directly rather than in strings formatted > specifically for the bki file, as in the attached. Thoughts? Good idea, I like this better than what Stas did in his patch. I'm a bit inclined to preserve the old variable names (toast_name, toast_oid etc) as the hash keys because they seem more greppable than the generic "oid", "name" that you have here. But maybe that isn't an interesting consideration. regards, tom lane