check-from-v0.27.0-custom-types.td 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # List
  10. > SELECT custom_list::text FROM int4_list_view;
  11. {1,2}
  12. > CREATE MATERIALIZED VIEW int4_list_view_after AS SELECT '{1,2}'::int4_list AS custom_list;
  13. > SELECT custom_list::text FROM int4_list_view_after;
  14. {1,2}
  15. > DROP MATERIALIZED VIEW int4_list_view_after;
  16. # Nested list
  17. > SELECT custom_nested_list::text FROM int4_list_list_view;
  18. {{1,2}}
  19. > CREATE MATERIALIZED VIEW int4_list_list_view_after AS SELECT '{{1,2}}'::int4_list_list AS custom_nested_list;
  20. > SELECT custom_nested_list::text FROM int4_list_list_view_after;
  21. {{1,2}}
  22. > DROP MATERIALIZED VIEW int4_list_list_view_after;
  23. # Map
  24. > SELECT custom_map::text FROM int4_map_view;
  25. {a=>1}
  26. > CREATE MATERIALIZED VIEW int4_map_view_after AS SELECT '{a=>1}'::int4_map AS custom_map;
  27. > SELECT custom_map::text FROM int4_map_view_after;
  28. {a=>1}
  29. > DROP MATERIALIZED VIEW int4_map_view_after;
  30. # Nested map
  31. > SELECT custom_nested_map::text FROM int4_map_map_view;
  32. "{a=>{\"a a\"=>1}}"
  33. > CREATE MATERIALIZED VIEW int4_map_map_view_after AS SELECT '{a=>{"a a"=>1}}'::int4_map_map AS custom_nested_map;
  34. > SELECT custom_nested_map::text FROM int4_map_map_view_after;
  35. "{a=>{\"a a\"=>1}}"
  36. > DROP MATERIALIZED VIEW int4_map_map_view_after;