table-persistence-after-basic.td 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. #
  10. # The table is expected to have its original data after restart
  11. #
  12. > SELECT * FROM t1;
  13. "2011-11-11 11:11:11" "\\x124"
  14. "<null>" "<null>"
  15. > SELECT * FROM v1;
  16. "2011-11-11 11:11:11" "\\x124"
  17. "<null>" "<null>"
  18. #
  19. # Exotic types
  20. #
  21. > SELECT CAST(int4_list AS text), CAST(int4_list_list AS text), CAST(int4_map AS text), CAST(int4_map_map AS text) FROM exotic_types;
  22. "{1,2}" "{{1,2}}" "{a=>1}" "{a=>{a=>1}}"
  23. > SELECT * FROM char_type_quoted;
  24. 97
  25. #
  26. # A table that has been dropped previously should not have become resurrected
  27. #
  28. ! SELECT * FROM to_be_dropped;
  29. contains:unknown catalog item 'to_be_dropped'
  30. #
  31. # Confirm that same-named tables in different schemas still has different contents
  32. #
  33. > SELECT * FROM schema1.t1;
  34. schema1
  35. > SELECT * FROM schema2.t1;
  36. schema2
  37. #
  38. # Recreated table
  39. #
  40. > INSERT INTO to_be_recreated VALUES (3);
  41. > SELECT * FROM to_be_recreated
  42. 2
  43. 3
  44. #
  45. # Renamed table
  46. #
  47. > INSERT INTO already_renamed VALUES (3);
  48. > SELECT * FROM already_renamed;
  49. 1
  50. 2
  51. 3