name_resolution.slt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. mode cockroach
  10. simple conn=mz_system,user=mz_system
  11. ALTER SYSTEM SET enable_connection_validation_syntax TO true;
  12. ----
  13. COMPLETE 0
  14. # over qualified objects should return an error
  15. query error qualified name did not have between 1 and 3 components
  16. SELECT * FROM universe.db.schema.foo
  17. # over qualified types should return an error
  18. query error qualified name did not have between 1 and 3 components
  19. SELECT 'true'::universe.database.schema.bool
  20. # Secret values must refer to secrets
  21. statement ok
  22. CREATE TABLE not_a_secret (a int);
  23. statement ok
  24. CREATE CONNECTION kafka_conn TO KAFKA (BROKER 'broker', SECURITY PROTOCOL PLAINTEXT) WITH (VALIDATE = false);
  25. statement error connection "materialize.public.kafka_conn" already exists
  26. CREATE CONNECTION kafka_conn TO KAFKA (BROKER 'broker', SECURITY PROTOCOL PLAINTEXT) WITH (VALIDATE = false);
  27. statement ok
  28. CREATE CONNECTION IF NOT EXISTS kafka_conn TO KAFKA (BROKER 'broker', SECURITY PROTOCOL PLAINTEXT) WITH (VALIDATE = false);
  29. statement error materialize.public.not_a_secret is not a secret
  30. CREATE CONNECTION kafka_conn2 TO KAFKA (BROKER 'broker', SECURITY PROTOCOL PLAINTEXT, SASL PASSWORD = SECRET not_a_secret) WITH (VALIDATE = false);
  31. statement error unknown catalog item 'not_an_object_at_all'
  32. CREATE CONNECTION kafka_conn2 TO KAFKA (BROKER 'broker', SECURITY PROTOCOL PLAINTEXT, SASL PASSWORD = SECRET not_an_object_at_all) WITH (VALIDATE = false);
  33. statement ok
  34. CREATE SECRET pgpass AS 'postgres'
  35. statement error unknown catalog item 'not_an_object_at_all'
  36. CREATE CONNECTION pg TO POSTGRES (
  37. HOST postgres,
  38. DATABASE postgres,
  39. USER postgres,
  40. PASSWORD SECRET pgpass,
  41. SSL MODE require,
  42. SSH TUNNEL not_an_object_at_all
  43. ) WITH (VALIDATE = false)
  44. statement ok
  45. CREATE TABLE object_reference (a int);
  46. # It's okay if idents for string options refer to objects.
  47. statement ok
  48. CREATE CONNECTION pg TO POSTGRES (
  49. HOST object_reference,
  50. DATABASE postgres,
  51. USER postgres
  52. ) WITH (VALIDATE = false)