123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- # Test PREPARE, EXECUTE, DEALLOCATE.
- send
- Query {"query": "DROP TABLE IF EXISTS t"}
- ----
- until ignore=NoticeResponse
- ReadyForQuery
- ----
- CommandComplete {"tag":"DROP TABLE"}
- ReadyForQuery {"status":"I"}
- send
- Query {"query": "DEALLOCATE ALL"}
- Query {"query": "DEALLOCATE a"}
- Query {"query": "EXECUTE a"}
- ----
- until
- ReadyForQuery
- ReadyForQuery
- ----
- CommandComplete {"tag":"DEALLOCATE ALL"}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"26000"},{"typ":"M","value":"prepared statement \"a\" does not exist"}]}
- ReadyForQuery {"status":"I"}
- # TOOD(mjibson): Teach scl.rs how to return error codes.
- until no_error_fields
- ReadyForQuery
- ----
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- send
- Query {"query": "PREPARE a AS SELECT 1"}
- Query {"query": "PREPARE a AS SELECT 1"}
- Query {"query": "EXECUTE a"}
- Query {"query": "EXECUTE a"}
- Query {"query": "DEALLOCATE a"}
- Query {"query": "EXECUTE a"}
- Query {"query": "DEALLOCATE a"}
- ----
- until
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ----
- CommandComplete {"tag":"PREPARE"}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"42P05"},{"typ":"M","value":"prepared statement \"a\" already exists"}]}
- ReadyForQuery {"status":"I"}
- RowDescription {"fields":[{"name":"?column?"}]}
- DataRow {"fields":["1"]}
- CommandComplete {"tag":"SELECT 1"}
- ReadyForQuery {"status":"I"}
- RowDescription {"fields":[{"name":"?column?"}]}
- DataRow {"fields":["1"]}
- CommandComplete {"tag":"SELECT 1"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"DEALLOCATE"}
- ReadyForQuery {"status":"I"}
- # TOOD(mjibson): Teach scl.rs how to return error codes.
- until no_error_fields
- ReadyForQuery
- ----
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- until
- ReadyForQuery
- ----
- ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"26000"},{"typ":"M","value":"prepared statement \"a\" does not exist"}]}
- ReadyForQuery {"status":"I"}
- send
- Query {"query": "PREPARE a AS SELECT 1"}
- Query {"query": "EXECUTE a"}
- Query {"query": "DEALLOCATE ALL"}
- Query {"query": "EXECUTE a"}
- ----
- until
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ----
- CommandComplete {"tag":"PREPARE"}
- ReadyForQuery {"status":"I"}
- RowDescription {"fields":[{"name":"?column?"}]}
- DataRow {"fields":["1"]}
- CommandComplete {"tag":"SELECT 1"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"DEALLOCATE ALL"}
- ReadyForQuery {"status":"I"}
- # TOOD(mjibson): Teach scl.rs how to return error codes.
- until no_error_fields
- ReadyForQuery
- ----
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- send
- Query {"query": "PREPARE a AS SELECT 1 + $2"}
- Query {"query": "PREPARE a AS SELECT 1 + $1"}
- Query {"query": "EXECUTE a"}
- Query {"query": "EXECUTE a ('a')"}
- Query {"query": "EXECUTE a (1, 2)"}
- Query {"query": "EXECUTE a (1)"}
- Query {"query": "DEALLOCATE a"}
- ----
- until no_error_fields
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ----
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"PREPARE"}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- RowDescription {"fields":[{"name":"?column?"}]}
- DataRow {"fields":["2"]}
- CommandComplete {"tag":"SELECT 1"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"DEALLOCATE"}
- ReadyForQuery {"status":"I"}
- send
- Query {"query": "CREATE TABLE t (i INT)"}
- Query {"query": "INSERT INTO t VALUES (1)"}
- Query {"query": "PREPARE a AS SELECT * FROM t"}
- Query {"query": "EXECUTE a"}
- Query {"query": "DROP TABLE t"}
- Query {"query": "EXECUTE a"}
- Query {"query": "CREATE TABLE t (a TEXT, b FLOAT)"}
- Query {"query": "INSERT INTO t VALUES ('a', 3)"}
- Query {"query": "EXECUTE a"}
- Query {"query": "DEALLOCATE a"}
- ----
- # TODO(mjibson): Ignore RowDescription here, see desc.pt for why.
- until no_error_fields ignore=RowDescription
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ReadyForQuery
- ----
- CommandComplete {"tag":"CREATE TABLE"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"INSERT 0 1"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"PREPARE"}
- ReadyForQuery {"status":"I"}
- DataRow {"fields":["1"]}
- CommandComplete {"tag":"SELECT 1"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"DROP TABLE"}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"CREATE TABLE"}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"INSERT 0 1"}
- ReadyForQuery {"status":"I"}
- ErrorResponse {"fields":[]}
- ReadyForQuery {"status":"I"}
- CommandComplete {"tag":"DEALLOCATE"}
- ReadyForQuery {"status":"I"}
|