check-from-v0.27.0-named-composite-types.td 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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. # Named composite type
  10. > SELECT f1::text, pg_typeof(f1) FROM composite_type_view;
  11. "(1,abc,2)" "composite_type"
  12. > CREATE MATERIALIZED VIEW composite_type_view_after AS SELECT (1, 'abc', 2.0)::composite_type as f1;
  13. > SELECT f1::text, pg_typeof(f1) FROM composite_type_view_after;
  14. "(1,abc,2)" "composite_type"
  15. > DROP MATERIALIZED VIEW composite_type_view_after;
  16. # Nested named composite types
  17. > SELECT f1::text, pg_typeof(f1) FROM nested_composite_type_view;
  18. "(3,\"(1,abc,2)\")" "nested_composite_type"
  19. > CREATE MATERIALIZED VIEW nested_composite_type_view_after AS SELECT (3, (1, 'abc', 2.0))::nested_composite_type as f1;
  20. > SELECT f1::text, pg_typeof(f1) FROM nested_composite_type_view_after;
  21. "(3,\"(1,abc,2)\")" "nested_composite_type"
  22. > DROP MATERIALIZED VIEW nested_composite_type_view_after;