feat: expose type OID and modifier on SimpleColumn - #1358
tristan957 wants to merge 1 commit into
Conversation
The simple query protocol's RowDescription message carries the type OID and type modifier for each column, but SimpleColumn was dropping both. Clients rendering column types (e.g. distinguishing varchar(50) from text) need access to this metadata, matching what's already exposed on Column for the extended query protocol. Closes: rust-postgres#1329
|
I see a PR was created at #1338. The PR has a lot of changes that seem strange, since this is a pretty simple change. That PR also only exposes the OID and not the type modifier. Happy to close the PR if the #1338 is a better candidate for merging. Thanks for rust-postgres. I used it at a previous job, and it is quite nice to use. |
| id SERIAL, | ||
| name TEXT | ||
| name TEXT, | ||
| description VARCHAR(50) |
There was a problem hiding this comment.
I added this column to be able to test that the type modifier is not always -1.
|
Should we expose other information in https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-ROWDESCRIPTION? The data type size, the column attribute number, format code, and the table OID sound interesting. |
|
@paolobarbolini anything I can do to help push this PR along? |
The simple query protocol's RowDescription message carries the type OID and type modifier for each column, but SimpleColumn was dropping both. Clients rendering column types (e.g. distinguishing varchar(50) from text) need access to this metadata, matching what's already exposed on Column for the extended query protocol.
Closes: #1329