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 1nOoX6-0000n3-UQ for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Feb 2022 22:30:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nOoX4-0001D2-77 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Feb 2022 22:30:18 +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 1nOoX3-0001Cr-U1 for pgsql-hackers@lists.postgresql.org; Mon, 28 Feb 2022 22:30:17 +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 1nOoX0-00074y-OW for pgsql-hackers@lists.postgresql.org; Mon, 28 Feb 2022 22:30:16 +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:Cc:References:To:Subject:Sender :Reply-To: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=E2DyE6jCSyET3rYWR2e0tXImhzK0qlWdrCOruUMZZSU=; b=ADbA0bRZFUGVPCe/zXvSah+PrU UEiiRNiJryTURLH8HQkdwDvJGtg09KSC9YHVEmA+Kvco1yaSWzlIG1zETK+X0HRSiGGH7py5zCpcz oLrW17aqoqnxgvfJFY39HzfOxPL6+lx4a9spwyZ8EWIkef45eyvAHmMQUZFuV+C0Eag5AAibl5Qma VbFkTOIyiBEjhawF4bVsxLqoYkOEF3ucg6m+geENcbH517ejPbbFxmeZGIg/NVoiUA1MqO9H6Bw/5 KaiCQbb8gIyB7lY1JoLkMWbh0hqvEI/Zzb/xqr7ZZMOqmvR8eBZGUJkHeOIU+g05p7UAPR9yoYlJv CGQmhWmQ==; Received: from 50-102-16-206.prtg.in.frontiernet.net ([50.102.16.206]:46842) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nOoWz-0065n4-28; Mon, 28 Feb 2022 17:30:13 -0500 Subject: Re: real/float example for testlibpq3 To: Tom Lane , Ashutosh Bapat References: <2511609.1646061540@sss.pgh.pa.us> Cc: Mark Wong , PostgreSQL Hackers From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <621D4CF3.6090808@anastigmatix.net> Date: Mon, 28 Feb 2022 17:30:11 -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: <2511609.1646061540@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 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 - lists.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/28/22 10:19, Tom Lane wrote: >> That will standardize the >> way to fetch real typed values in libpq. That leads to the next >> question. Do we need to introduce different PQget*value() for standard >> C/SQL data types. > > ... I do not want to go here. Where would you stop? How would you > deal with cross-machine inconsistencies in integer widths? This stimulates a question for me. Not just libpq, but all drivers implemented in whatever language, if they wish to support binary protocol, depend on knowing what the committed send/recv wire formats are for whichever types they mean to support. In the current state of affairs, what's considered the ur-source of that information? I have often seen those formats documented in code comments, usually above the recv function in the .c file for a given adt. Have we got any more, well, machine-readable collection of that knowledge? Regards, -Chap