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 1lWUxO-0001yz-Ak for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Apr 2021 02:08:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lWUxN-00020O-3D for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Apr 2021 02:08:41 +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 1lWUxM-00020G-Ko for pgsql-hackers@lists.postgresql.org; Wed, 14 Apr 2021 02:08:40 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lWUxF-0001Yt-GB for pgsql-hackers@lists.postgresql.org; Wed, 14 Apr 2021 02:08:39 +0000 Received: by mail-pj1-x102d.google.com with SMTP id lr1-20020a17090b4b81b02900ea0a3f38c1so2250284pjb.0 for ; Tue, 13 Apr 2021 19:08:32 -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=5r13lhzS8MbhwYMJ1jrmXF8bYMAMJOMZbAc/haUPCLI=; b=GQuRudS5K95aprRm2ON4YWl4zyv7EkP6PB7rG5fBYZMS7QL1QOWdNH/o5mrLQgQmAd 5WLYWnu3IiWG3lu4/8lm38FOIf4VLi5SXN1KCYj+KgcTtNvSAFmW65BaNIkMIEDKuwPG 8UemWTcs+ZyypTCjeaa7AejqLACiZvTa6/7XA= 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=5r13lhzS8MbhwYMJ1jrmXF8bYMAMJOMZbAc/haUPCLI=; b=OnruPEudSquiQMnWlzj5vUHNk1DBNo+99kE9S8ggEK+plapaTwpk7SF1ChiYCLoL+8 Z5Q++wfft/wD9I3zu9bMbUbL+k5iWbXDsuLklSVzmNXUiUJUaySQguiUtc34UiogmbuA sTl2+yg7YUIVDCU6ufi1ZlCWXfMAfusN33oSFgVHd251rOs9OC+8i5NkbjNMsI4ym2ng cbQC5KnllDWhrwo5vR2hY2UB5+4gIjvbBwNPZBEhPKJuuu1LKEITm9ERgjs4VdlW+aRI sn82eKyCao5EVyRhDDhBY7+QmwRC7PQNqxroIhMmOgCicJgRFCk6esSB2DWvUPrEhelv WeXA== X-Gm-Message-State: AOAM530wrDEf9PGjdDoeqLW7P/vcSaWw3z8Ge9cmy/g0//ugnSC8anIs 2KLzvlxOH3jH0IqQjZl94v6knw== X-Google-Smtp-Source: ABdhPJyjwwn6JFuUb6ZzDJ65CS4rbYp5qGM2PvXYgOYshtPTIVbNi1sRF86yZreUQHX9ZpY7pEvcFA== X-Received: by 2002:a17:90b:2242:: with SMTP id hk2mr889905pjb.4.1618366110948; Tue, 13 Apr 2021 19:08:30 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id a81sm13215876pfa.165.2021.04.13.19.08.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Apr 2021 19:08:30 -0700 (PDT) Date: Tue, 13 Apr 2021 19:08:27 -0700 From: Noah Misch To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut Subject: Re: Converting contrib SQL functions to new style Message-ID: <20210414020827.GA1232417@rfd.leadboat.com> References: <3395418.1618352794@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3395418.1618352794@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 Tue, Apr 13, 2021 at 06:26:34PM -0400, Tom Lane wrote: > Attached are some draft patches to convert almost all of the > contrib modules' SQL functions to use SQL-standard function bodies. > The point of this is to remove the residual search_path security > hazards that we couldn't fix in commits 7eeb1d986 et al. Since > a SQL-style function body is fully parsed at creation time, > its object references are not subject to capture by the run-time > search path. Are there any inexact matches in those function/operator calls? Will that matter more or less than it does today? > However I think we may still need an assumption that earthdistance > and cube are in the same schema --- any comments on that? That part doesn't change, indeed. > I'd like to propose squeezing these changes into v14, even though > we're past feature freeze. Reason one is that this is less a > new feature than a security fix; reason two is that this provides > some non-artificial test coverage for the SQL-function-body feature. Dogfooding like this is good. What about the SQL-language functions that initdb creates?