24-types-money.td 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. # Make sure that the MONEY type is replicated correctly
  11. #
  12. $ postgres-execute connection=postgres://postgres:postgres@postgres
  13. CREATE TABLE money_type (f1 MONEY);
  14. ALTER TABLE money_type REPLICA IDENTITY FULL;
  15. INSERT INTO money_type VALUES (NULL), (12.34);
  16. # waiting for the subject fails with "subject not found"
  17. $ skip-if
  18. SELECT true
  19. $ schema-registry-wait topic=postgres.public.money_type
  20. > CREATE CONNECTION IF NOT EXISTS csr_conn TO CONFLUENT SCHEMA REGISTRY (
  21. URL '${testdrive.schema-registry-url}'
  22. );
  23. > CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  24. > CREATE SOURCE money_type
  25. FROM KAFKA CONNECTION kafka_conn (TOPIC 'postgres.public.money_type');
  26. > CREATE TABLE money_type_tbl FROM SOURCE money_type (REFERENCE "postgres.public.money_type")
  27. FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION csr_conn
  28. ENVELOPE DEBEZIUM;
  29. ! SELECT * FROM money_type_tbl;
  30. contains:decimals with precision greater than 38 are not supported