mirror of https://github.com/postgres/postgres
The libpq_pipeline program recently introduced by commit acb7e4eb6b
is well equipped to test the PQtrace() functionality, so let's make it
do that.
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20210327192812.GA25115@alvherre.pgsql
pull/64/head
parent
198b3716db
commit
7bebd0d009
@ -0,0 +1,9 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 13 Query "SELECT 1" |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '1' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
@ -0,0 +1,26 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 21 Parse "" "SELECT $1" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '1' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
F 21 Parse "" "SELECT $1" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '1' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '1' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '1' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
@ -0,0 +1,65 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 42 Query "DROP TABLE IF EXISTS pq_pipeline_demo" |
||||
B 123 NoticeResponse S "NOTICE" V "NOTICE" C "00000" M "table "pq_pipeline_demo" does not exist, skipping" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 15 CommandComplete "DROP TABLE" |
||||
B 5 ReadyForQuery I |
||||
F 83 Query "CREATE UNLOGGED TABLE pq_pipeline_demo(id serial primary key, itemno integer);" |
||||
B 17 CommandComplete "CREATE TABLE" |
||||
B 5 ReadyForQuery I |
||||
F 61 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1);" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '1' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 39 Parse "" "SELECT no_such_function($1)" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '1' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 61 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1);" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '2' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
F 61 Parse "" "INSERT INTO pq_pipeline_demo(itemno) VALUES ($1);" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '3' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 4 NoData |
||||
B 15 CommandComplete "INSERT 0 1" |
||||
B 217 ErrorResponse S "ERROR" V "ERROR" C "42883" M "function no_such_function(integer) does not exist" H "No function matches the given name and argument types. You might need to add explicit type casts." P "8" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 5 ReadyForQuery I |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 4 NoData |
||||
B 15 CommandComplete "INSERT 0 1" |
||||
B 5 ReadyForQuery I |
||||
F 26 Parse "" "SELECT 1; SELECT 2" 0 |
||||
F 12 Bind "" "" 0 0 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 123 ErrorResponse S "ERROR" V "ERROR" C "42601" M "cannot insert multiple commands into a prepared statement" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 5 ReadyForQuery I |
||||
F 54 Parse "" "SELECT 1.0/g FROM generate_series(3, -1, -1) g" 0 |
||||
F 12 Bind "" "" 0 0 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 65535 -1 0 |
||||
B 32 DataRow 1 22 '0.33333333333333333333' |
||||
B 32 DataRow 1 22 '0.50000000000000000000' |
||||
B 32 DataRow 1 22 '1.00000000000000000000' |
||||
B 70 ErrorResponse S "ERROR" V "ERROR" C "22012" M "division by zero" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 5 ReadyForQuery I |
||||
F 40 Query "SELECT itemno FROM pq_pipeline_demo" |
||||
B 31 RowDescription 1 "itemno" NNNN 2 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '3' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
@ -0,0 +1,21 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 68 Parse "select_one" "SELECT $1, '42', $1::numeric, interval '1 sec'" 1 NNNN |
||||
F 16 Describe S "select_one" |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 10 ParameterDescription 1 NNNN |
||||
B 113 RowDescription 4 "?column?" NNNN 0 NNNN 4 -1 0 "?column?" NNNN 0 NNNN 65535 -1 0 "numeric" NNNN 0 NNNN 65535 -1 0 "interval" NNNN 0 NNNN 16 -1 0 |
||||
B 5 ReadyForQuery I |
||||
F 10 Query "BEGIN" |
||||
B 10 CommandComplete "BEGIN" |
||||
B 5 ReadyForQuery T |
||||
F 43 Query "DECLARE cursor_one CURSOR FOR SELECT 1" |
||||
B 19 CommandComplete "DECLARE CURSOR" |
||||
B 5 ReadyForQuery T |
||||
F 16 Describe P "cursor_one" |
||||
F 4 Sync |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 |
||||
B 5 ReadyForQuery T |
||||
F 4 Terminate |
||||
@ -0,0 +1,15 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 21 Parse "" "SELECT $1" 1 NNNN |
||||
F 19 Bind "" "" 0 1 1 '1' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 33 RowDescription 1 "?column?" NNNN 0 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '1' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
@ -0,0 +1,42 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 38 Parse "" "SELECT generate_series(42, $1)" 0 |
||||
F 20 Bind "" "" 0 1 2 '44' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 38 Parse "" "SELECT generate_series(42, $1)" 0 |
||||
F 20 Bind "" "" 0 1 2 '45' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 38 Parse "" "SELECT generate_series(42, $1)" 0 |
||||
F 20 Bind "" "" 0 1 2 '46' 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 |
||||
B 12 DataRow 1 2 '42' |
||||
B 12 DataRow 1 2 '43' |
||||
B 12 DataRow 1 2 '44' |
||||
B 13 CommandComplete "SELECT 3" |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 |
||||
B 12 DataRow 1 2 '42' |
||||
B 12 DataRow 1 2 '43' |
||||
B 12 DataRow 1 2 '44' |
||||
B 12 DataRow 1 2 '45' |
||||
B 13 CommandComplete "SELECT 4" |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 40 RowDescription 1 "generate_series" NNNN 0 NNNN 4 -1 0 |
||||
B 12 DataRow 1 2 '42' |
||||
B 12 DataRow 1 2 '43' |
||||
B 12 DataRow 1 2 '44' |
||||
B 12 DataRow 1 2 '45' |
||||
B 12 DataRow 1 2 '46' |
||||
B 13 CommandComplete "SELECT 5" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
@ -0,0 +1,64 @@ |
||||
F 27 Query "SET lc_messages TO "C"" |
||||
B 8 CommandComplete "SET" |
||||
B 5 ReadyForQuery I |
||||
F 79 Query "DROP TABLE IF EXISTS pq_pipeline_tst;CREATE TABLE pq_pipeline_tst (id int)" |
||||
B 122 NoticeResponse S "NOTICE" V "NOTICE" C "00000" M "table "pq_pipeline_tst" does not exist, skipping" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 15 CommandComplete "DROP TABLE" |
||||
B 17 CommandComplete "CREATE TABLE" |
||||
B 5 ReadyForQuery I |
||||
F 24 Parse "rollback" "ROLLBACK" 0 |
||||
F 13 Parse "" "BEGIN" 0 |
||||
F 14 Bind "" "" 0 0 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 18 Parse "" "SELECT 0/0" 0 |
||||
F 14 Bind "" "" 0 0 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 22 Bind "" "rollback" 0 0 1 1 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (1)" 0 |
||||
F 14 Bind "" "" 0 0 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (2)" 0 |
||||
F 14 Bind "" "" 0 0 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
F 22 Bind "" "rollback" 0 0 1 1 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 46 Parse "" "INSERT INTO pq_pipeline_tst VALUES (3)" 0 |
||||
F 14 Bind "" "" 0 0 1 0 |
||||
F 6 Describe P "" |
||||
F 9 Execute "" 0 |
||||
F 4 Sync |
||||
F 4 Sync |
||||
B 4 ParseComplete |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 4 NoData |
||||
B 10 CommandComplete "BEGIN" |
||||
B 4 ParseComplete |
||||
B 65 ErrorResponse S "ERROR" V "ERROR" C "22012" M "division by zero" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 5 ReadyForQuery E |
||||
B 145 ErrorResponse S "ERROR" V "ERROR" C "25P02" M "current transaction is aborted, commands ignored until end of transaction block" F "SSSS" L "SSSS" R "SSSS" \x00 |
||||
B 5 ReadyForQuery E |
||||
B 4 BindComplete |
||||
B 4 NoData |
||||
B 13 CommandComplete "ROLLBACK" |
||||
B 4 ParseComplete |
||||
B 4 BindComplete |
||||
B 4 NoData |
||||
B 15 CommandComplete "INSERT 0 1" |
||||
B 5 ReadyForQuery I |
||||
B 5 ReadyForQuery I |
||||
F 34 Query "SELECT * FROM pq_pipeline_tst" |
||||
B 27 RowDescription 1 "id" NNNN 1 NNNN 4 -1 0 |
||||
B 11 DataRow 1 1 '3' |
||||
B 13 CommandComplete "SELECT 1" |
||||
B 5 ReadyForQuery I |
||||
F 4 Terminate |
||||
Loading…
Reference in new issue