raise.pt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Test that the RAISE statement sends messages with the correct severity.
  2. # Ensure all severity levels are actually sent to the client
  3. send
  4. Query {"query": "SET client_min_messages TO DEBUG"}
  5. ----
  6. until
  7. ReadyForQuery
  8. ----
  9. CommandComplete {"tag":"SET"}
  10. ReadyForQuery {"status":"I"}
  11. send
  12. Query {"query": "RAISE DEBUG"}
  13. ----
  14. until err_field_typs=S
  15. CommandComplete
  16. ReadyForQuery
  17. ----
  18. NoticeResponse {"fields":[{"typ":"S","value":"DEBUG"}]}
  19. CommandComplete {"tag":"RAISE"}
  20. ReadyForQuery {"status":"I"}
  21. send
  22. Query {"query": "RAISE INFO"}
  23. ----
  24. until err_field_typs=S
  25. ReadyForQuery
  26. ----
  27. NoticeResponse {"fields":[{"typ":"S","value":"INFO"}]}
  28. CommandComplete {"tag":"RAISE"}
  29. ReadyForQuery {"status":"I"}
  30. send
  31. Query {"query": "RAISE LOG"}
  32. ----
  33. until err_field_typs=S
  34. ReadyForQuery
  35. ----
  36. NoticeResponse {"fields":[{"typ":"S","value":"LOG"}]}
  37. CommandComplete {"tag":"RAISE"}
  38. ReadyForQuery {"status":"I"}
  39. send
  40. Query {"query": "RAISE NOTICE"}
  41. ----
  42. until err_field_typs=S
  43. ReadyForQuery
  44. ----
  45. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"}]}
  46. CommandComplete {"tag":"RAISE"}
  47. ReadyForQuery {"status":"I"}
  48. send
  49. Query {"query": "RAISE WARNING"}
  50. ----
  51. until err_field_typs=S
  52. ReadyForQuery
  53. ----
  54. NoticeResponse {"fields":[{"typ":"S","value":"WARNING"}]}
  55. CommandComplete {"tag":"RAISE"}
  56. ReadyForQuery {"status":"I"}