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 1jc8uE-0006YJ-Bd for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 14:44:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jc8uD-000602-8f for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 14:44:13 +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 1jc8uD-0005zv-0i for pgsql-general@lists.postgresql.org; Fri, 22 May 2020 14:44:13 +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 1jc8uA-0004FD-V8 for pgsql-general@postgresql.org; Fri, 22 May 2020 14:44:12 +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 04MEi9Xs026542; Fri, 22 May 2020 10:44:09 -0400 From: Tom Lane To: Tim Kane cc: PostgreSQL mailing lists Subject: Re: btree_gist extension - gbt_cash_union return type In-reply-to: References: Comments: In-reply-to Tim Kane message dated "Fri, 22 May 2020 09:19:57 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26540.1590158649.1@sss.pgh.pa.us> Date: Fri, 22 May 2020 10:44:09 -0400 Message-ID: <26541.1590158649@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tim Kane writes: > I've noticed a discrepancy in the return type for the gbt_cash_union > function... > On fresh instances of postgres 9.6.11, where the btree_gist extension is > newly created (version 1.2) yields a gbt_cash_union function with a return > type of gbtreekey16 ... which is correct. > While instances that have been upgraded from 9.6.2 to 9.6.11, where the > btree_gist was originally installed as 1.0 and then upgraded from 1.0 to > 1.2 - that same function has a return type of gbtreekey8 Hm. I think this is an oversight in commit 749a787c5; we were focused on fixing the functions' argument types and forgot that there were any return-type changes. However, I'm not too fussed about it. Nothing checks those signatures at run-time, so it's basically cosmetic. The reason for the pushups in 749a787c5 was to ensure that we could name the functions in ALTER FUNCTION; but that just depends on the argument types, so it's not a reason to worry either. > Is it safe/recommended to modify this function to return gbtreekey16? I wouldn't sweat about it. If you did want to fix it, it'd have to be a manual UPDATE on pg_proc, there not being any ALTER FUNCTION way to do it. On the whole, the risk of fat-fingering the update and thereby hosing your database seems to outweigh any benefit. > Perhaps safer still to drop the extension and recreate it? That would force dropping the indexes that depend on it, so it seems like a big overreaction. regards, tom lane