besquared opened a new issue, #4797:
URL: https://github.com/apache/arrow-adbc/issues/4797

   PostgreSQL result descriptions expose declared NUMERIC precision and scale 
through libpq PQfmod, but the driver currently retains PQftype and the type 
name without carrying the result type modifier into the Arrow field metadata.
   
   For example, SELECT 1.25::numeric(29,9) returns an exact UTF-8 numeric 
value, but a downstream consumer cannot distinguish its declared bounds from a 
result with no modifier. Exposing the existing modifier would let consumers 
apply their own decimal conversion policy without SQL parsing, another 
connection, or changes to the string transport.
   
   Proposal: preserve PQfmod for top-level numeric result columns in COPY and 
non-COPY execution, including ExecuteSchema and empty results. Represent it as 
a signed decimal metadata string, including -1 when PostgreSQL supplies no 
modifier. POSTGRESQL:typmod is a proposed key following POSTGRESQL:type; naming 
is open to review. This does not infer bounds, convert numeric values, change 
catalog discovery, or implement requested output schemas.
   
   Related prior discussion explicitly mentions PQfmod: 
https://github.com/apache/arrow-adbc/pull/758#discussion_r1224844245 . Also 
related: #767 and #4687.
   
   I have an implementation with native schema tests and read-only PostgreSQL 
integration coverage for both execution paths.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to