Re: real/float example for testlibpq3 - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: real/float example for testlibpq3
Date
Msg-id 621D4CF3.6090808@anastigmatix.net
Whole thread Raw
In response to Re: real/float example for testlibpq3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: real/float example for testlibpq3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Removing unneeded self joins
Next
From: Tom Lane
Date:
Subject: Re: Separate the result of \watch for each query execution (psql)