notice.pt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Test various NOTICE expectations.
  2. # Test dropping objects that do not exist
  3. send
  4. Query {"query": "create table t()"}
  5. Query {"query": "drop table if exists t, s, t"}
  6. Query {"query": "drop table if exists t, s, t"}
  7. Query {"query": "create database t"}
  8. Query {"query": "drop database if exists t"}
  9. Query {"query": "drop database if exists t"}
  10. Query {"query": "create schema t"}
  11. Query {"query": "drop schema if exists t, s, t"}
  12. Query {"query": "drop schema if exists t, s, t"}
  13. Query {"query": "create role t"}
  14. Query {"query": "drop role if exists t, s, t"}
  15. Query {"query": "drop role if exists t, s, t"}
  16. ----
  17. until
  18. ReadyForQuery
  19. ReadyForQuery
  20. ReadyForQuery
  21. ReadyForQuery
  22. ReadyForQuery
  23. ReadyForQuery
  24. ReadyForQuery
  25. ReadyForQuery
  26. ReadyForQuery
  27. ReadyForQuery
  28. ReadyForQuery
  29. ReadyForQuery
  30. ----
  31. CommandComplete {"tag":"CREATE TABLE"}
  32. ReadyForQuery {"status":"I"}
  33. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"TABLE \"s\" does not exist, skipping"}]}
  34. CommandComplete {"tag":"DROP TABLE"}
  35. ReadyForQuery {"status":"I"}
  36. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"TABLE \"t\" does not exist, skipping"}]}
  37. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"TABLE \"s\" does not exist, skipping"}]}
  38. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"TABLE \"t\" does not exist, skipping"}]}
  39. CommandComplete {"tag":"DROP TABLE"}
  40. ReadyForQuery {"status":"I"}
  41. CommandComplete {"tag":"CREATE DATABASE"}
  42. ReadyForQuery {"status":"I"}
  43. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"00000"},{"typ":"M","value":"drop cascades to 1 other objects"}]}
  44. CommandComplete {"tag":"DROP DATABASE"}
  45. ReadyForQuery {"status":"I"}
  46. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"DATABASE \"t\" does not exist, skipping"}]}
  47. CommandComplete {"tag":"DROP DATABASE"}
  48. ReadyForQuery {"status":"I"}
  49. CommandComplete {"tag":"CREATE SCHEMA"}
  50. ReadyForQuery {"status":"I"}
  51. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SCHEMA \"s\" does not exist, skipping"}]}
  52. CommandComplete {"tag":"DROP SCHEMA"}
  53. ReadyForQuery {"status":"I"}
  54. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SCHEMA \"t\" does not exist, skipping"}]}
  55. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SCHEMA \"s\" does not exist, skipping"}]}
  56. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SCHEMA \"t\" does not exist, skipping"}]}
  57. CommandComplete {"tag":"DROP SCHEMA"}
  58. ReadyForQuery {"status":"I"}
  59. CommandComplete {"tag":"CREATE ROLE"}
  60. ReadyForQuery {"status":"I"}
  61. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"ROLE \"s\" does not exist, skipping"}]}
  62. CommandComplete {"tag":"DROP ROLE"}
  63. ReadyForQuery {"status":"I"}
  64. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"ROLE \"t\" does not exist, skipping"}]}
  65. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"ROLE \"s\" does not exist, skipping"}]}
  66. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"ROLE \"t\" does not exist, skipping"}]}
  67. CommandComplete {"tag":"DROP ROLE"}
  68. ReadyForQuery {"status":"I"}
  69. # AlterNoop
  70. send
  71. Query {"query": "CREATE ROLE joe"}
  72. Query {"query": "ALTER DATABASE IF EXISTS d OWNER TO joe"}
  73. Query {"query": "ALTER SCHEMA IF EXISTS d OWNER TO joe"}
  74. Query {"query": "ALTER TABLE IF EXISTS t RENAME to x"}
  75. Query {"query": "ALTER CLUSTER REPLICA IF EXISTS c.r OWNER to joe"}
  76. Query {"query": "ALTER CLUSTER IF EXISTS c OWNER to joe"}
  77. Query {"query": "ALTER SINK IF EXISTS s OWNER to joe"}
  78. Query {"query": "ALTER SECRET IF EXISTS s OWNER to joe"}
  79. Query {"query": "ALTER CONNECTION IF EXISTS c OWNER to joe"}
  80. ----
  81. until
  82. ReadyForQuery
  83. ReadyForQuery
  84. ReadyForQuery
  85. ReadyForQuery
  86. ReadyForQuery
  87. ReadyForQuery
  88. ReadyForQuery
  89. ReadyForQuery
  90. ReadyForQuery
  91. ----
  92. CommandComplete {"tag":"CREATE ROLE"}
  93. ReadyForQuery {"status":"I"}
  94. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"DATABASE \"d\" does not exist, skipping"}]}
  95. CommandComplete {"tag":"ALTER DATABASE"}
  96. ReadyForQuery {"status":"I"}
  97. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SCHEMA \"d\" does not exist, skipping"}]}
  98. CommandComplete {"tag":"ALTER SCHEMA"}
  99. ReadyForQuery {"status":"I"}
  100. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"TABLE \"t\" does not exist, skipping"}]}
  101. CommandComplete {"tag":"ALTER TABLE"}
  102. ReadyForQuery {"status":"I"}
  103. ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"XX000"},{"typ":"M","value":"altering the owner of a cluster replica is not supported"}]}
  104. ReadyForQuery {"status":"I"}
  105. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"CLUSTER \"c\" does not exist, skipping"}]}
  106. CommandComplete {"tag":"ALTER CLUSTER"}
  107. ReadyForQuery {"status":"I"}
  108. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SINK \"s\" does not exist, skipping"}]}
  109. CommandComplete {"tag":"ALTER SINK"}
  110. ReadyForQuery {"status":"I"}
  111. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"SECRET \"s\" does not exist, skipping"}]}
  112. CommandComplete {"tag":"ALTER SECRET"}
  113. ReadyForQuery {"status":"I"}
  114. NoticeResponse {"fields":[{"typ":"S","value":"NOTICE"},{"typ":"C","value":"42704"},{"typ":"M","value":"CONNECTION \"c\" does not exist, skipping"}]}
  115. CommandComplete {"tag":"ALTER CONNECTION"}
  116. ReadyForQuery {"status":"I"}