Commit Graph

2737 Commits

Author SHA1 Message Date
Jeff Davis
aadf9420ef Add escape_identifier() and escape_literal(). 2020-11-28 22:35:41 -08:00
Steven Fackler
83ffcf8639
Merge pull request #697 from sfackler/dependabot/cargo/pin-project-lite-0.2
Update pin-project-lite requirement from 0.1 to 0.2
2020-11-17 08:34:24 -05:00
dependabot-preview[bot]
235dfeb95a
Update pin-project-lite requirement from 0.1 to 0.2
Updates the requirements on [pin-project-lite](https://github.com/taiki-e/pin-project-lite) to permit the latest version.
- [Release notes](https://github.com/taiki-e/pin-project-lite/releases)
- [Changelog](https://github.com/taiki-e/pin-project-lite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project-lite/compare/v0.1.0...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-17 13:29:23 +00:00
Steven Fackler
fb07eaff48
Merge pull request #692 from nguiard/master
Fix unix socket location in docs (/var/run/postgresql instead of /var/lib/postgresql)
2020-11-11 07:08:53 -05:00
Nicolas Guiard
c4b1f5ab5c Fix unix socket location in docs (/var/run/postgresql instead of /var/lib/postgresql) 2020-11-11 11:14:28 +01:00
Steven Fackler
5ad3c9a139 Add back keepalives config handling
Also fix connection timeouts to be per-address
2020-11-05 21:14:56 -05:00
Steven Fackler
bbf31696bb Cleanups 2020-10-27 19:45:55 -04:00
Steven Fackler
1fcd04d03a
Merge pull request #684 from vemoo/better-params-iter
better api for passing parameters to `*_raw` methods
2020-10-27 19:20:06 -04:00
Steven Fackler
46b4b8008c
Update postgres-types/src/lib.rs 2020-10-27 19:16:20 -04:00
Bernardo Uriarte Blanco
996f063380 map to convert to &dyn ToSql is not longer necessary 2020-10-27 20:31:15 +01:00
Bernardo Uriarte Blanco
42dcfb584a seal BorrowToSql 2020-10-27 20:23:57 +01:00
Bernardo Uriarte Blanco
0e494a08a9 change rest of *_raw methods to use BorrowToSql 2020-10-27 18:08:23 +01:00
Bernardo Uriarte Blanco
0eab5fad70 make iterators from &dyn ToSql or T: ToSql work as parameters 2020-10-26 20:59:28 +01:00
Steven Fackler
5e065c36cd Release v0.18.1 2020-10-19 20:02:01 -04:00
Steven Fackler
ecc0acbab6
Merge pull request #678 from sfackler/fix-send
Make postgres::Client Send again
2020-10-19 20:01:31 -04:00
Steven Fackler
db90323b08 Make postgres::Client Send again
Closes #677
2020-10-19 19:58:41 -04:00
Steven Fackler
49ecba4d6d
Merge pull request #675 from sfackler/dependabot/cargo/env_logger-0.8
Update env_logger requirement from 0.7 to 0.8
2020-10-19 09:40:39 -04:00
Steven Fackler
a4fd89ea02
Merge pull request #676 from sfackler/dependabot/cargo/hmac-0.10
Update hmac requirement from 0.9 to 0.10
2020-10-19 09:40:18 -04: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
dependabot-preview[bot]
6561d8129a
Update env_logger requirement from 0.7 to 0.8
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 13:23:29 +00:00
Steven Fackler
ec1c4a5c65 Release postgres-openssl v0.4.0 2020-10-17 15:20:32 -04:00
Steven Fackler
473562175f Release postgres-native-tls v0.4.0 2020-10-17 15:18:28 -04:00
Steven Fackler
cc77ad18d5 Release postgres v0.18.0 2020-10-17 15:16:56 -04:00
Steven Fackler
12e2f03b53 Release tokio-postgres v0.6.0 2020-10-17 15:06:10 -04:00
Steven Fackler
7fd04e7a21 Release postgres-types v0.1.3 2020-10-17 15:00:47 -04: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
Steven Fackler
b30182962f bump ci image 2020-10-17 09:52:46 -04:00
Steven Fackler
2689070d19 Upgrade to tokio 0.3 2020-10-17 09:49:45 -04:00
Steven Fackler
91144b91e3
Merge pull request #669 from pymongo/master
Make postgres protocol version value more readable
2020-10-17 08:04:08 -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
Steven Fackler
510062238d
Merge pull request #662 from danburkert/json-derive
derive Clone, PartialEq and Eq for postgres_types::Json
2020-10-04 21:11:24 -04:00
Dan Burkert
aadd90854d derive Clone, PartialEq and Eq for postgres_types::Json
It's a bit unwieldy using the `Json` type in structs without this.
`Json` is 'just data', so I think it's usually appropriate to consider
instances to be cloneable and testable for equivalence.
2020-10-02 15:56:50 -07:00
Steven Fackler
587193f61a
Merge pull request #661 from sfackler/dependabot/cargo/base64-0.13
Update base64 requirement from 0.12 to 0.13
2020-10-01 10:30:43 -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
Steven Fackler
b6e1ab9d1e
Merge pull request #659 from benesch/chrono-no-oldtime
Disable chrono's "oldtime" feature to drop time v0.1
2020-09-25 15:52:20 -04:00
Nikhil Benesch
bb961edcc4 Disable chrono's "oldtime" feature to drop time v0.1
The latest version of chrono, v0.4.16, permits removing its dependency
on the long-deprecated time v0.1 crate by disabling the "oldtime"
feature.

For backwards compatibility, chrono is leaving the "oldtime" feature on
by default, so disabling the "oldtime" feature requires disabling all
default features and then re-enabling the one default feature ("clock")
that rust-postgres needs.

Note that this change does not cause any backwards-compatibility
problems for users of rust-postgres. The "oldtime" feature controls only
whether `time_v01::Duration` and `chrono::Duration` are the same type
and does not affect any of the APIs used by rust-postgres.
2020-09-25 15:36:51 -04:00
Steven Fackler
eabcc28657
Merge pull request #655 from benesch/notice-callback
Permit configuring the notice callback
2020-09-22 20:51:55 -04:00
Nikhil Benesch
4af6fcd911 Permit configuring the notice callback
Right now the behavior is hardcoded to log any received notices at the
info level. Add a `notice_callback` configuration option that permits
installing an arbitrary callback to handle any received notices.

As discussed in #588.
2020-09-21 20:04:35 -04:00
Steven Fackler
cd31c02d77
Merge pull request #657 from botika/master
Clean code at connect function
2020-09-20 14:06:25 -04:00
Juan Aguilar Santillana
a2ca75e9c4 Prettify host cast as str 2020-09-20 10:43:22 +00:00
Juan Aguilar Santillana
391a54aea1 Avoiding get reference of a u16 2020-09-20 10:37:15 +00:00
Steven Fackler
4237843a0e
Merge pull request #648 from sfackler/dependabot/cargo/hmac-0.9
Update hmac requirement from 0.8 to 0.9
2020-08-12 12:03:16 -04: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
fc131afa9c
Merge pull request #645 from jyn514/display
Give a more helpful message on error
2020-08-01 16:24:02 -04:00
Joshua Nelson
61f6e3e5c4 Add newline before DETAIL and HINT 2020-08-01 11:12:22 -04:00
Joshua Nelson
ce7ce310b9 Give a more helpful message on error
Before:

```
database error: ERROR: insert or update on table "owner_rels" violates foreign key constraint "owner_rels_cid_fkey"
```

After:

```
database error: ERROR: insert or update on table "owner_rels" violates foreign key constraint "owner_rels_cid_fkey"
DETAIL:  Key (cid)=(4) is not present in table "releases".
```
2020-07-31 20:59:57 -04:00
Steven Fackler
286b9dcd0a
Merge pull request #641 from benesch/infinity-overflow
Use checked arithmetic when decoding into chrono types
2020-07-31 09:30:31 -04:00
Nikhil Benesch
a30f0b6c05 Use checked arithmetic when decoding into chrono types
This avoids an overflow panic if the timestamp is the special "infinity"
or "-infinity" value and produces an error instead.

Fix #640.
2020-07-30 22:52:56 -04:00