mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 01:16:30 +00:00
mm
This commit is contained in:
@@ -107,6 +107,9 @@ cd ../..
|
|||||||
#
|
#
|
||||||
pip3 install -r tests/python/requirements.txt
|
pip3 install -r tests/python/requirements.txt
|
||||||
python3 tests/python/tests.py || exit 1
|
python3 tests/python/tests.py || exit 1
|
||||||
|
|
||||||
|
start_pgcat "info"
|
||||||
|
|
||||||
python3 tests/python/async_test.py
|
python3 tests/python/async_test.py
|
||||||
|
|
||||||
start_pgcat "info"
|
start_pgcat "info"
|
||||||
|
|||||||
@@ -569,6 +569,8 @@ impl Server {
|
|||||||
let code = message.get_u8() as char;
|
let code = message.get_u8() as char;
|
||||||
let _len = message.get_i32();
|
let _len = message.get_i32();
|
||||||
|
|
||||||
|
trace!("Message: {}", code);
|
||||||
|
|
||||||
match code {
|
match code {
|
||||||
// ReadyForQuery
|
// ReadyForQuery
|
||||||
'Z' => {
|
'Z' => {
|
||||||
|
|||||||
@@ -2,15 +2,18 @@ import psycopg2
|
|||||||
import asyncio
|
import asyncio
|
||||||
import asyncpg
|
import asyncpg
|
||||||
|
|
||||||
|
PGCAT_HOST = "127.0.0.1"
|
||||||
|
PGCAT_PORT = "6432"
|
||||||
|
|
||||||
|
|
||||||
def regular_main():
|
def regular_main():
|
||||||
# Connect to the PostgreSQL database
|
# Connect to the PostgreSQL database
|
||||||
conn = psycopg2.connect(
|
conn = psycopg2.connect(
|
||||||
host="localhost",
|
host=PGCAT_HOST,
|
||||||
database="sharded_db",
|
database="sharded_db",
|
||||||
user="sharding_user",
|
user="sharding_user",
|
||||||
password="sharding_user",
|
password="sharding_user",
|
||||||
port=6432,
|
port=PGCAT_PORT,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Open a cursor to perform database operations
|
# Open a cursor to perform database operations
|
||||||
@@ -34,11 +37,11 @@ def regular_main():
|
|||||||
async def main():
|
async def main():
|
||||||
# Connect to the PostgreSQL database
|
# Connect to the PostgreSQL database
|
||||||
conn = await asyncpg.connect(
|
conn = await asyncpg.connect(
|
||||||
host="localhost",
|
host=PGCAT_HOST,
|
||||||
database="sharded_db",
|
database="sharded_db",
|
||||||
user="sharding_user",
|
user="sharding_user",
|
||||||
password="sharding_user",
|
password="sharding_user",
|
||||||
port=6432,
|
port=PGCAT_PORT,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Execute a SQL query
|
# Execute a SQL query
|
||||||
|
|||||||
Reference in New Issue
Block a user