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 1nMFwX-0001e8-Oy for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 21:10:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nMFwW-0001zP-9l for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 21:10:00 +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 1nMFwV-0001zG-Lu for pgsql-hackers@lists.postgresql.org; Mon, 21 Feb 2022 21:10:00 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMFwR-0007WM-My for pgsql-hackers@postgresql.org; Mon, 21 Feb 2022 21:09:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IpozM7jP3jialraFqtTC9dev6LYHFzSjl1EWWtVykGs=; b=sQELg6CSmBRlErb6wYFesfVU6t XAtGSWd5DbIiPkM8r5C/m4Xauk4YGBzuNZCYnitumhnqTdPnFDv2eg38YLJdYW5SCrhv7z4a9zBq8 4cJBrJQtGCd+igpamzMrJtf8oA6CunWANEWvH69SjgHava/dklQ2IKkC/N0avZ7+at5e8hgUuDQme fZwcbfran3eRjIUNZsE3xHh0aJ3ijIc0Ddl51/fx+ag+prfnbEz9659xy0y96RGpb3YWY/Y9CpGYl uG9fFd2AeGKvYoTdacZ0nKN8idi+pdoZG5ncZj3y1QOrNCH/PIGNF42Pef4QxKJvd2zWVpGY89ZDi FsffHAVg==; Received: from 50-102-16-206.prtg.in.frontiernet.net ([50.102.16.206]:40707) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nMFwP-001mH6-Lq; Mon, 21 Feb 2022 16:09:54 -0500 Subject: Re: Documentation about PL transforms To: Peter Eisentraut , PostgreSQL Hackers References: <61FDBCFE.3090800@anastigmatix.net> <62017DB3.5020900@anastigmatix.net> From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <6213FFA0.1080202@anastigmatix.net> Date: Mon, 21 Feb 2022 16:09:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <62017DB3.5020900@anastigmatix.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 02/07/22 15:14, Chapman Flack wrote: > I'll work on some doc patches. It seems a bit of an impedance mismatch that there is a get_func_trftypes producing a C Oid[] (with its length returned separately), while get_transform_fromsql and get_transform_tosql both expect a List. There is only one in-core caller of get_func_trftypes (it is print_function_trftypes in ruleutils.c), while both in-core PLs that currently support transforms are reduced to rolling their own List by grabbing the protrftypes Datum and hitting it with oid_array_to_list. Would it be reasonable to deprecate get_func_trftypes and instead provide a get_call_trftypes (following the naming of get_call_result_type where _call_ encompasses functions and procedures) that returns a List, and use that consistently? Regards, -Chap