Commit Graph

83 Commits

Author SHA1 Message Date
Steven Fackler
3eb5a4dab9 actually fix clippy 2021-06-23 20:15:57 -04:00
Steven Fackler
8f7481a86c fix clippy 2021-06-23 20:02:51 -04:00
Steven Fackler
52de269367 fix clippy 2021-05-18 20:47:26 -04:00
Steven Fackler
4e8b9078a1 fix build 2021-04-29 17:07:24 -04:00
dependabot[bot]
83616fadb5
Update hmac requirement from 0.10 to 0.11
Updates the requirements on [hmac](https://github.com/RustCrypto/MACs) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/MACs/releases)
- [Commits](https://github.com/RustCrypto/MACs/compare/hmac-v0.10.0...hmac-v0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-29 21:02:13 +00:00
Steven Fackler
a598c52906 Release postgres-protocol v0.6.1 2021-04-03 17:06:51 -04:00
Steven Fackler
ad2c8cf592 clippy 2021-03-16 20:44:50 -04:00
Jeff Davis
e4e48a06b7 Add password module for hashing on the client side.
Hashing a password on the client side is useful so that you can set a
user's password without ever sending it in plain text to the
server. This avoids leaking passwords in the log or elsewhere.
2021-01-12 14:39:10 -08:00
Jeff Davis
f3cbc8ce04 PgLsn type. 2021-01-09 15:18:26 -08:00
Nikhil Benesch
7537e8a918 postgres-protocol: use RustCrypto md-5 crate
Swap the md5 crate for the md-5 crate.  Despite the latter's somewhat
more suspicious name, it is part of the wider RustCrypto ecosystem, and
shares code with the sha2 crate that postgres-protocol already uses.
2021-01-08 13:35:45 -05:00
Steven Fackler
06dcebf248 Release postgres-protocol v0.6.0 2020-12-25 08:51:47 -05:00
Nikhil Benesch
f1729e4636 deps: upgrade to tokio v1.0 ecosystem 2020-12-24 18:38:05 -05:00
Steven Fackler
07aa69febf update rand 2020-12-21 10:05:20 -05:00
Jeff Davis
c573edbdfb Documentation fixup. 2020-12-15 16:50:26 -08:00
Jeff Davis
aadf9420ef Add escape_identifier() and escape_literal(). 2020-11-28 22:35:41 -08:00
dependabot-preview[bot]
a2ab2aab5b
Update hmac requirement from 0.9 to 0.10
Updates the requirements on [hmac](https://github.com/RustCrypto/MACs) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/MACs/releases)
- [Commits](https://github.com/RustCrypto/MACs/compare/hmac-v0.9.0...hmac-v0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 13:24:08 +00:00
Steven Fackler
3f350680d5 Release postgres-protocol v0.5.3 2020-10-17 14:54:00 -04:00
Steven Fackler
3a26c926f2
Merge pull request #672 from sfackler/tokio-03
Upgrade to tokio 0.3
2020-10-17 09:57:07 -04:00
wuaoxiang
7443982368 Make postgres protocol version value more readable 2020-10-17 11:33:21 +08:00
Steven Fackler
d1f9d6d802 fix clippy 2020-10-15 21:14:13 -04:00
dependabot-preview[bot]
6c506c1c16
Update base64 requirement from 0.12 to 0.13
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.12.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 13:18:42 +00:00
dependabot-preview[bot]
26d7b38b03
Update hmac requirement from 0.8 to 0.9
Updates the requirements on [hmac](https://github.com/RustCrypto/MACs) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/MACs/releases)
- [Commits](https://github.com/RustCrypto/MACs/compare/hmac-v0.8.0...hmac-v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 13:17:41 +00:00
Steven Fackler
90f763b968 Release postgres-protocol v0.5.2 2020-07-06 16:30:43 -04:00
Steven Fackler
a12efc41d7 rustfmt 2020-06-10 16:46:55 -07:00
Steven Fackler
58a7856646 Update hmac and sha2 2020-06-10 16:45:58 -07:00
Steven Fackler
e25987656e Release postgres-protocol v0.5.1 2020-03-17 15:36:22 -07:00
dependabot-preview[bot]
0fb9ede350
Update base64 requirement from 0.11 to 0.12
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.11.0...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 13:24:28 +00:00
Lachezar Lechev
66194766d0
Fix repository link 2020-01-02 14:08:15 +02:00
Steven Fackler
75a67fd06b Remove unneeded generic-array dependency 2019-12-23 16:12:28 -08:00
Steven Fackler
1c5ceebe8a Release postgres-protocol v0.5.0 2019-12-23 15:23:25 -08:00
Steven Fackler
9e10d782b5
Merge pull request #526 from sfackler/dependabot/cargo/base64-0.11
Update base64 requirement from 0.10 to 0.11
2019-12-23 18:10:07 -05:00
dependabot-preview[bot]
9b443da418
Update md5 requirement from 0.6 to 0.7
Updates the requirements on [md5](https://github.com/stainless-steel/md5) to permit the latest version.
- [Release notes](https://github.com/stainless-steel/md5/releases)
- [Commits](https://github.com/stainless-steel/md5/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-23 22:59:56 +00:00
dependabot-preview[bot]
188e5eb656
Update base64 requirement from 0.10 to 0.11
Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.10.0...v0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-23 22:59:25 +00:00
Steven Fackler
2615441c7d Doc cleanup and "real" extensible enums 2019-12-21 18:14:28 -08:00
Steven Fackler
2d083ec1c8 Release postgres-protocol v0.5.0-alpha.2 2019-11-27 20:32:13 -05:00
Steven Fackler
12c2ef79b6 Upgrade to tokio 0.2/futures 0.3 2019-11-26 16:32:36 -08:00
Brandon W Maister
4a3df873e9 Make all invalid message length errors unique 2019-11-19 10:28:31 -05:00
mibac138
9a83196e23 Update dependencies 2019-10-19 20:34:11 +02:00
Steven Fackler
9ebdca23e1 Release postgres-protocol v0.5.0-alpha.1 2019-10-14 17:46:45 -07:00
Steven Fackler
0736382593 Fix tests 2019-10-12 17:47:55 -07:00
Steven Fackler
ffd7245e54 Use BytesMut for messages
Benchmarks indicate that malloc accounts for a significant amount of the
runtime of queries. The message buffer accounts for ~half of that (the
other being channels), and this change should eliminate it.
2019-10-12 16:30:27 -07:00
Steven Fackler
2cc5bbf21b Inline buffer methods 2019-09-08 16:56:31 -07:00
Steven Fackler
904c951ad6 Release postgres v0.16.0-rc.2 2019-06-29 21:43:50 -07:00
Steven Fackler
47d83d57a0 Release postgres-protocol v0.4.1 2019-06-29 21:06:23 -07:00
Steven Fackler
2d2a5dea81 Send response messages in blocks
Our codec implementation originally just parsed single messages out of
the stream buffer. However, if a query returns a bunch of rows, we're
spending a ton of time shipping those individual messages from the
connection back to the Query stream. Instead, collect blocks of unparsed
messages that are as large as possible and send those back.

This cuts the processing time of the following query in half, from ~10
seconds to ~5:
`SELECT s.n, 'name' || s.n FROM generate_series(0, 9999999) AS s(n)`

At this point, almost all of the remainder of the time is spent parsing
the rows.

cc #450
2019-06-27 21:47:13 -07:00
Steven Fackler
db462eb018 Avoid copies in copy_in
copy_in data was previously copied ~3 times - once into the copy_in
buffer, once more to frame it into a CopyData frame, and once to write
that into the stream.

Our Codec is now a bit more interesting. Rather than just writing out
pre-encoded data, we can also send along unencoded CopyData so they can
be framed directly into the stream output buffer. In the future we can
extend this to e.g. avoid allocating for simple commands like Sync.

This also allows us to directly pass large copy_in input directly
through without rebuffering it.
2019-06-25 18:54:17 -07:00
Steven Fackler
956ba12b54 Conversions from INET to IpAddr
We ignore the netmask when deserializing and use /32 or /128 when
serializing.

Closes #430
2019-04-03 21:30:49 -07:00
Steven Fackler
fd3f3feafc Move types tests to their own file 2019-04-03 20:50:41 -07:00
Steven Fackler
3b31551f73 Upgrade fallible-iterator 2019-03-10 16:32:28 -07:00
Steven Fackler
9385bebefc Release postgres-protocol v0.4.0 2019-03-05 19:09:48 -08:00