2
0
Commit Graph

9 Commits

Author SHA1 Message Date
Yuli Khodorkovskiy 28c20e93c0 Fix json marshal/unmarshal implementations
Fix marshal/unmarshal for:
- authentication_{cleartext_password, md5_password, ok, sasl, sasl_continue, sasl_final}
- error_response
2021-05-29 11:06:05 -05:00
Henrique Vicente 9c2c389e06 json: fix implementation of json Unmarshalers.
* AuthenticationMD5Password was wrong and is not needed
* Bind was wrong
* ErrorResponse is not needed
* Minor improvements for reliability
2021-05-22 11:34:25 -05:00
Henrique Vicente ba924e5715 json: Implement json.Unmarshaler for messages.
This will allow using pgmockproxy output as ingestion data for pgmock.
2021-05-22 11:34:25 -05:00
Yuli Khodorkovskiy 1213b69774 Add support to ErrorResponse for unlocalized severity
Add missing 'V' field for unlocalized severity added in PG versions 9.6
and greater. See https://www.postgresql.org/docs/current/protocol-error-fields.html
2020-12-28 10:22:55 -06:00
Jack Christensen 432c2951c7 Add a lot of documentation 2019-06-08 19:38:34 -05:00
Josh Leverette 66af2227c0 Fix encoding of ErrorResponse 2019-01-19 11:42:30 -06:00
Jack Christensen d6312305ae Replace MarshalBinary with Encode
This new approach can avoid allocations.
2017-05-26 17:00:44 -05:00
Jack Christensen eff55451cf Reduce allocations and copies in pgproto3
Altered chunkreader to never reuse memory.

Altered pgproto3 to to copy memory when decoding. Renamed UnmarshalBinary to
Decode because of changed semantics.
2017-04-29 11:55:14 -05:00
Jack Christensen 4e2900b774 Introduce pgproto3 package
pgproto3 will wrap the message encoding and decoding for the PostgreSQL
frontend/backend protocol version 3.
2017-04-29 10:02:38 -05:00