Skip to content

Conversation

@SergeiPatiakin
Copy link
Contributor

What

Expose the 4-byte type-specific type modifier on the Column struct

Why

I would like access type modifiers for prepared statement columns. E.g. for a numeric column I would like to get the numeric precision and scale. For a varchar column I would like to get the varchar length limit.

Context

This is an extension of #1084 where other table and column OIDs were exposed in Column, and exposing type modifiers was noted as a possibility.

@rishitesh-snt
Copy link

rishitesh-snt commented Aug 29, 2024

+1 for this PR. This would enable the result set handling in a much better way rather than falling back to defaults. In fact, rather than type modifier, we should expose the derived precision & scale at the upper level API like Statement.

@SergeiPatiakin
Copy link
Contributor Author

@paolobarbolini how does this PR look?

@SergeiPatiakin
Copy link
Contributor Author

This PR closes #1300

@paolobarbolini paolobarbolini linked an issue Dec 14, 2025 that may be closed by this pull request
Copy link
Member

@paolobarbolini paolobarbolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@paolobarbolini paolobarbolini merged commit 18022c0 into rust-postgres:master Dec 14, 2025
paolobarbolini added a commit that referenced this pull request Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose type modifier in Column struct

3 participants