Crates.io | pg_wire |
lib.rs | pg_wire |
version | 0.8.1 |
source | src |
created_at | 2020-10-22 17:12:45.029017 |
updated_at | 2021-04-11 10:44:47.542911 |
description | Server Side implementation of PostgreSQL Wire Protocol |
homepage | |
repository | https://github.com/alex-dukhno/pg_wire |
max_upload_size | |
id | 304388 |
size | 145,267 |
The crate supports:
Add this to you Cargo.toml
if you want to use it with tokio
runtime
pg_wire = { version = "0.9.0", features = ["tokio_net"] }
Add this to you Cargo.toml
if you want to enable smol
runtime support
pg_wire = { version = "0.9.0", features = ["async_io"] }
Open your terminal and run the following command:
cargo run --example smol_server --features async_io
Open another terminal window and run:
psql -h 127.0.0.1 -U postgres -p 5432 -W
Enter any password
The server always handles select 1
SQL query
Open your terminal and run the following command:
cargo run --example tokio_server --features tokio_net
Open another terminal window and run:
psql -h 127.0.0.1 -U postgres -p 5432 -W
Enter any password
The server always handles select 1
SQL query
Open your terminal and run the following command:
cargo run --example secured_smol_server --features async_io
Open another terminal window and run:
psql -h 127.0.0.1 -U postgres -p 5432 -W
Enter any password After that in the console you should see something like
psql (13.2, server 12.4)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
postgres=> select 3;
col1
------
1
(1 row)
postgres=>
The server always handles select 1
SQL query