Crate pgtest[][src]

pgtest is a Postgres wire protocol tester using datadriven test files. It can be used to send specific messages to any Postgres-compatible server and record received messages.

The following datadriven directives are supported:

During debugging, set the environment variable PGTEST_VERBOSE=1 to see messages sent and received.

Supported send types:

Supported until arguments:

For example, to execute a simple prepared statement:

send
Parse {"query": "SELECT $1::text, 1 + $2::int4"}
Bind {"values": ["blah", "4"]}
Execute
Sync
----

until
ReadyForQuery
----
ParseComplete
BindComplete
DataRow {"fields":["blah","5"]}
CommandComplete {"tag":"SELECT 1"}
ReadyForQuery {"status":"I"}

Structs

Bind
CommandComplete
CopyOut
DataRow
Describe
ErrorField
ErrorResponse
Execute
Field
ParameterDescription
Parse
PgTest
Query
ReadyForQuery
RowDescription

Functions

format_name
run_test
walk