collate.slt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. query T
  10. SELECT '12:00:00' COLLATE pg_catalog.default
  11. ----
  12. 12:00:00
  13. statement OK
  14. CREATE TABLE test1 (a text, b text)
  15. statement OK
  16. INSERT INTO test1 VALUES('a', 'b')
  17. query B
  18. SELECT a < b FROM test1
  19. ----
  20. true
  21. query B
  22. SELECT a < b COLLATE pg_catalog.default FROM test1
  23. ----
  24. true
  25. query B
  26. SELECT a COLLATE pg_catalog.default < b FROM test1
  27. ----
  28. true
  29. # verify that other types are not supported
  30. query error COLLATE not yet supported
  31. SELECT '12:00:00' COLLATE "en_US"
  32. query error COLLATE not yet supported
  33. SELECT '12:00:00' COLLATE "de_DE"
  34. query error COLLATE not yet supported
  35. SELECT '12:00:00' COLLATE pg_catalog.de_DE
  36. query error COLLATE not yet supported
  37. SELECT '12:00:00' COLLATE mz_catalog.default