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 1lXJsg-0001PS-4u for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Apr 2021 08:31: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 1lXJsb-0004e8-DO for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Apr 2021 08:31:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXJsb-0004e1-6u for pgsql-hackers@lists.postgresql.org; Fri, 16 Apr 2021 08:31:09 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lXJsV-0005Kq-KW for pgsql-hackers@lists.postgresql.org; Fri, 16 Apr 2021 08:31:08 +0000 Received: by mail-pg1-x52f.google.com with SMTP id f29so18735131pgm.8 for ; Fri, 16 Apr 2021 01:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wx9PFLr8VpXu5of1ufzMmu+cbMl/nDyZQxazIozXoK8=; b=DA7d0UIEDZ5BMzUAt0JCROHuYsGXOup2g7s8Po9Rjzm8W4SJm9BMvX9El8izKABric sf6yTYQ69oayI6bI5QLs+RYbftFBE1jDmDW14KDkOHf/E1BbIffNr/XB4Ss7a0D5zGhi KMRG+xeAXH7Xa+nKYSdrWHbyf8DrRjVPBtBwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wx9PFLr8VpXu5of1ufzMmu+cbMl/nDyZQxazIozXoK8=; b=oKgzn9V1ND9pqZTy0o67b6/XNYBdykSonJS6o6urzK/Lu3xYzW0dmfcbD2oZhs7MQT qlF/GWw70DoAog+fZ1VKA/MK5r5hspGL3ZVu1e11jU+4Tr9IrDqGDVzHE65BwQAsJ4h9 qKuSyyPKPfaBCJGtohkjmIwQCtnsQeKl9MTCkdyy0VRxEydfbsCu5+J0mLO1FbOUgup6 4kKgkZPmtnpTI/gqom9OGyvuMcW+ApjH9fbuiOyOhvVe93GxqC/E7wr23rC9EBADXjfe Y9Rvh/4zqUmxbxS6BVfzyzKJNSlPLOFJCypLn4OGu4E5Y39w2ZbqzoKRmBzgVzX14Gy4 tM7w== X-Gm-Message-State: AOAM533957CajCbnnY2tpe6/9JcWNDO6/u4QdtX0iV+4CluXWSZajqTe K0U8CzynxxDFJHfc26eCuVe9AA== X-Google-Smtp-Source: ABdhPJwa7iwp1BCsdMS9OhtTHd7UmpV6GW43l2VI5NMULlX587k/lqkIKOdvdKNVr8eQN4P6+GBYbg== X-Received: by 2002:a63:1716:: with SMTP id x22mr7266937pgl.261.1618561861394; Fri, 16 Apr 2021 01:31:01 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id 144sm4028616pfy.75.2021.04.16.01.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Apr 2021 01:31:00 -0700 (PDT) Date: Fri, 16 Apr 2021 01:30:58 -0700 From: Noah Misch To: Tom Lane Cc: Andrew Dunstan , Robert Haas , PostgreSQL Hackers , Peter Eisentraut Subject: Re: Converting built-in SQL functions to new style Message-ID: <20210416083058.GC1365702@rfd.leadboat.com> References: <3956760.1618529139@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3956760.1618529139@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 15, 2021 at 07:25:39PM -0400, Tom Lane wrote: > Here's a draft patch that converts all the built-in and information_schema > SQL functions to new style, except for half a dozen that cannot be > converted because they use polymorphic arguments. This patch looks good. > One thing I was wondering about, but did not pull the trigger on > here, is whether to split off the function-related stuff in > system_views.sql into a new file "system_functions.sql", as has > long been speculated about by the comments in system_views.sql. > I think it is time to do this because > > (a) The function stuff now amounts to a full third of the file. Fair. > (b) While the views made by system_views.sql are intentionally > not pinned, the function-related commands are messing with > pre-existing objects that *are* pinned. This seems quite > confusing to me, and it might interfere with the intention that > you could reload the system view definitions using this file. I'm not aware of that causing a problem. Currently, the views give a few errors, and the functions do not.