feat(c/driver/postgresql): expose numeric result type modifiers - #4798
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed paths are covered, with no unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Exposes PostgreSQL numeric type modifiers in Arrow result metadata without changing numeric value representation.
Changes:
- Propagates
PQfmodthrough COPY, non-COPY, and schema paths. - Emits and documents
POSTGRESQL:typmod. - Adds unit and integration coverage.
| File | Description |
|---|---|
docs/source/driver/postgresql.rst |
Documents numeric typmod metadata. |
c/driver/postgresql/result_reader.cc |
Propagates modifiers for non-COPY results. |
c/driver/postgresql/result_helper.h |
Exposes PQfmod. |
c/driver/postgresql/result_helper.cc |
Preserves modifiers during type resolution. |
c/driver/postgresql/postgresql_test.cc |
Tests COPY, non-COPY, schema, and empty-result paths. |
c/driver/postgresql/postgres_type.h |
Stores and emits numeric typmod metadata. |
c/driver/postgresql/postgres_type_test.cc |
Tests metadata generation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Can you clean up this prose? Stuff like "It does not add modifiers to parameter schemas or catalog discovery." is rather unnecessary; I don't need a full log of the AI's thought process baked into the docs.
There was a problem hiding this comment.
I'd rather have just a section briefly listing the metadata keys we attach and describing each one.
There was a problem hiding this comment.
Sorry yeah there's a bunch of slop in here, I wasn't sure this would even come to the attention of folks so I hadn't looked over it closely yet. I'll go back through it as soon as I get some time to return to it.
Summary
Carry libpq PQfmod into numeric result-field metadata as POSTGRESQL:typmod.
Closes #4797.
Assisted-by: OpenAI Codex