ddl-extended.pt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Test that multiple DDL statements in the same extended request are supported
  2. send
  3. Query {"query": "DROP TABLE IF EXISTS a"}
  4. Query {"query": "DROP TABLE IF EXISTS b"}
  5. ----
  6. until ignore=NoticeResponse
  7. ReadyForQuery
  8. ReadyForQuery
  9. ----
  10. CommandComplete {"tag":"DROP TABLE"}
  11. ReadyForQuery {"status":"I"}
  12. CommandComplete {"tag":"DROP TABLE"}
  13. ReadyForQuery {"status":"I"}
  14. send
  15. Parse {"query": "CREATE TABLE a (a int)"}
  16. Bind
  17. Execute
  18. Parse {"query": "CREATE TABLE b (a int)"}
  19. Bind
  20. Execute
  21. Parse {"query": "INSERT INTO a VALUES (1)"}
  22. Bind
  23. Execute
  24. Parse {"query": "SELECT 1/0"}
  25. Bind
  26. Execute
  27. Sync
  28. Query {"query": "SELECT * FROM a"}
  29. ----
  30. until
  31. ReadyForQuery
  32. ReadyForQuery
  33. ----
  34. ParseComplete
  35. BindComplete
  36. CommandComplete {"tag":"CREATE TABLE"}
  37. ParseComplete
  38. BindComplete
  39. CommandComplete {"tag":"CREATE TABLE"}
  40. ParseComplete
  41. BindComplete
  42. CommandComplete {"tag":"INSERT 0 1"}
  43. ParseComplete
  44. BindComplete
  45. ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"XX000"},{"typ":"M","value":"division by zero"}]}
  46. ReadyForQuery {"status":"I"}
  47. RowDescription {"fields":[{"name":"a"}]}
  48. DataRow {"fields":["1"]}
  49. CommandComplete {"tag":"SELECT 1"}
  50. ReadyForQuery {"status":"I"}
  51. send
  52. Parse {"query": "SELECT * FROM a"}
  53. Bind
  54. Execute
  55. Sync
  56. ----
  57. until
  58. ReadyForQuery
  59. ----
  60. ParseComplete
  61. BindComplete
  62. DataRow {"fields":["1"]}
  63. CommandComplete {"tag":"SELECT 1"}
  64. ReadyForQuery {"status":"I"}