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 1nKDKG-0007Zk-LF for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 05:58:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nKDKF-0003mJ-Gz for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Feb 2022 05:58:03 +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 1nKDKF-0003mA-7Q for pgsql-hackers@lists.postgresql.org; Wed, 16 Feb 2022 05:58:03 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nKDKA-0003gU-Np for pgsql-hackers@postgresql.org; Wed, 16 Feb 2022 05:58:02 +0000 Received: by mail-il1-x12c.google.com with SMTP id z7so696767ilb.6 for ; Tue, 15 Feb 2022 21:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Lz7wtXj40gxSyJp/YgkmqFa4kz/zI4S0Z1HUgm6gFCc=; b=ySLxrn1/KMa3MnsHpm3ZdFN3OcrO2Rag5XuJewY/GPWub+n0uSbUVgAqI52zTGUT8I 4OcEofudzV9UMKTakc5aDk3jomhztsVFRYQQL59sLYWiqTDTwah6kZ/s/A28nGcydqo0 79PyePcnCurprh08912LzT8rsmxVWKcX5wYxmy0AM52rridEWwkR4vJ/vaMKDKYNl1Xo 0ZETZB5/U1b5i8U2tSdiyBpqgZhZaPWYvc+LH0xY1BpvumEFOi9EXGRbqtnLR0Ie634i Z8KocVgEFhN+mWcFpwfW14BvoLPYt4B7J5oJV8JbRp0eaR53B+vw824HnF0TR5qpBph1 nDPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Lz7wtXj40gxSyJp/YgkmqFa4kz/zI4S0Z1HUgm6gFCc=; b=nFHcod/Gso44gqVCK1k8xsKRodRR3Skq3oeiwfOutoNQLO6en9HvdJ5y/afcgH1+Dh GGs604jXpyzJSiz4J5oyqqOJdEU7VmHKgt7seutFea/r9XhbL5tISY6uB/bJ+ThApLh5 4YbcYtYOaI/rPUXYk4HJIrGQ5kenyoG3MVjNPPMT3gvseOykgfSq9nGE1dcjeuqXenre GnvSe+Gzk8Dn8aNCWmez3vWdBSXmdlBihaQVfYAVm5gAm3BO20fZsoNCS25DnDrqpdHk Yt2b4Lbce2FiuCSJPyE1O+ZITvEtSwTlf0dfc/3ECVQMbaN5wrYFj5TyngAabSWbao2N J/Lg== X-Gm-Message-State: AOAM533g7u1hXHmCYAyHg6n984T9CjL7d9zP+Am72cULh6TMTBnT8Rwt fC3iHNzKa5JkFzmF/PLIRrk0Sw== X-Google-Smtp-Source: ABdhPJzlRYQBwH/ZQvV8oiKX1KPoZxlwCWQu52Hgy4s0J6Wkjkius/ORLY2ONk2rqXn3qMbVCrC2BQ== X-Received: by 2002:a05:6e02:cd2:b0:2be:8daa:31c with SMTP id c18-20020a056e020cd200b002be8daa031cmr803634ilj.49.1644991077946; Tue, 15 Feb 2022 21:57:57 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n3sm25210895ioz.9.2022.02.15.21.57.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Feb 2022 21:57:57 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C9130800740; Tue, 15 Feb 2022 23:57:56 -0600 (CST) Date: Tue, 15 Feb 2022 23:57:56 -0600 From: Justin Pryzby To: Melanie Plageman Cc: pgsql-hackers@postgresql.org, Andres Freund , Alvaro Herrera , Michael Paquier Subject: Re: make tuplestore helper function Message-ID: <20220216055756.GD31460@telsasoft.com> References: <20211102202353.GG17618@telsasoft.com> <20211108201338.GU17618@telsasoft.com> <20211118182430.GO17618@telsasoft.com> <20211217200419.GQ17618@telsasoft.com> <20220106005748.GT14051@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 11, 2022 at 10:19:33AM -0500, Melanie Plageman wrote: > > If the expectedDesc NULL check were an 0001 patch, then 0002 (the main patch) > > would be even easier to review. Only foreign.c is different. > > I'll wait to do that if preferred by committer. > Are you imagining that patch 0001 would only add the check for > expectedDesc that is missing from pg_config() and text_to_table()? Yes, that's what I meant, but I haven't been able to determine if a NULL check should be added at all. I found this commit message, which indicates that it shouldn't be used in every case. I'm not clear when it should/not be used, though. commit 60651e4cddbb77e8f1a0c7fc0be6a7e7bf626fe0 Author: Tom Lane Date: Sat Oct 28 14:02:21 2017 -0400 Support domains over composite types in PL/Perl. In passing, don't insist on rsi->expectedDesc being set unless we actually need it; this allows succeeding in a couple of cases where PL/Perl functions returning setof composite would have failed before, and makes the error message more apropos in other cases.