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

Consider the use of binary format vs text in message protocol #837

Open
matthughes opened this issue Apr 3, 2023 · 1 comment
Open

Consider the use of binary format vs text in message protocol #837

matthughes opened this issue Apr 3, 2023 · 1 comment

Comments

@matthughes
Copy link
Contributor

https://www.postgresql.org/docs/current/protocol-overview.html#PROTOCOL-FORMAT-CODES

Binary representations for integers use network byte order (most significant byte first). For other data types consult the documentation or source code to learn about the binary representation. Keep in mind that binary representations for complex data types might change across server versions; the text format is usually the more portable choice.

Perhaps start with the core data types? Even just start with int? Can you mix/match text/binary in the same request with some fields being binary and others text?

@tpolecat
Copy link
Member

tpolecat commented Apr 3, 2023

The format is a property of the connection so it's all or nothing. JDBC, etc. all use text as far as I know because the binary format is volatile and undocumented.

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

No branches or pull requests

2 participants