types-reg.td 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. # Test reg* data types
  11. #
  12. > CREATE SECRET pgpass AS 'postgres'
  13. > CREATE CONNECTION pg TO POSTGRES (
  14. HOST postgres,
  15. DATABASE postgres,
  16. USER postgres,
  17. PASSWORD SECRET pgpass
  18. )
  19. # Insert data pre-snapshot
  20. $ postgres-execute connection=postgres://postgres:postgres@postgres
  21. ALTER USER postgres WITH replication;
  22. DROP SCHEMA IF EXISTS public CASCADE;
  23. DROP PUBLICATION IF EXISTS mz_source;
  24. CREATE SCHEMA public;
  25. CREATE TABLE regtype_table (f1 REGTYPE);
  26. ALTER TABLE regtype_table REPLICA IDENTITY FULL;
  27. INSERT INTO regtype_table VALUES (1::regtype),(0::regtype);
  28. CREATE TABLE regclass_table (f1 REGCLASS);
  29. ALTER TABLE regclass_table REPLICA IDENTITY FULL;
  30. INSERT INTO regclass_table VALUES (1::regclass),(0::regclass);
  31. CREATE TABLE regproc_table (f1 REGPROC);
  32. ALTER TABLE regproc_table REPLICA IDENTITY FULL;
  33. INSERT INTO regproc_table VALUES (1::regproc),(2::regproc);
  34. CREATE PUBLICATION mz_source FOR ALL TABLES;
  35. !CREATE SOURCE mz_source
  36. FROM POSTGRES CONNECTION pg (PUBLICATION 'mz_source')
  37. FOR TABLES (regtype_table);
  38. contains:table regtype_table contains column f1 of type regtype which Materialize cannot currently ingest
  39. !CREATE SOURCE mz_source
  40. FROM POSTGRES CONNECTION pg (PUBLICATION 'mz_source')
  41. FOR TABLES (regclass_table);
  42. contains:table regclass_table contains column f1 of type regclass which Materialize cannot currently ingest
  43. !CREATE SOURCE mz_source
  44. FROM POSTGRES CONNECTION pg (PUBLICATION 'mz_source')
  45. FOR TABLES (regproc_table);
  46. contains:table regproc_table contains column f1 of type regproc which Materialize cannot currently ingest
  47. > CREATE SOURCE mz_source
  48. FROM POSTGRES CONNECTION pg (
  49. PUBLICATION 'mz_source',
  50. TEXT COLUMNS (regproc_table.f1)
  51. )
  52. FOR TABLES (regproc_table);
  53. > SELECT * FROM regproc_table;
  54. 1
  55. 2