Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returns only one character from char(3) field #79

Closed
Maxim-Inv opened this issue Feb 9, 2020 · 3 comments · Fixed by #72
Closed

returns only one character from char(3) field #79

Maxim-Inv opened this issue Feb 9, 2020 · 3 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@Maxim-Inv
Copy link

I have a table with a field of char(3) type. When I execute a query I got only one symbol instead all three characters. The data is ok in database, I see all three characters.

https://github.com/vapor/postgres-nio/blob/master/Sources/PostgresNIO/Data/PostgresData%2BString.swift#L50

For example, currency.column("id") - "id": 0x594552 (BPCHAR).

@Maxim-Inv Maxim-Inv changed the title return only one character from char(3) field returns only one character from char(3) field Feb 9, 2020
@Maxim-Inv
Copy link
Author

The workaround is use varchar(3) instead char(3)

@Maxim-Inv
Copy link
Author

it relates to #71

@tanner0101 tanner0101 added the bug Something isn't working label Feb 12, 2020
@tanner0101
Copy link
Member

Thanks for reporting @Maxim-Inv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants