sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.46k stars 439 forks source link

Expose type modifier in Column struct #1141

Closed SergeiPatiakin closed 4 months ago

SergeiPatiakin commented 4 months ago

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 https://github.com/sfackler/rust-postgres/pull/1084 where other table and column OIDs were exposed in Column, and exposing type modifiers was noted as a possibility.