pg_get_constraintdef.slt 957 B

123456789101112131415161718192021222324252627282930313233
  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. # This file is derived from the logic test suite in CockroachDB. The
  11. # original file was retrieved on June 10, 2019 from:
  12. #
  13. # The original source code is subject to the terms of the Apache
  14. # 2.0 license, a copy of which can be found in the LICENSE file at the
  15. # root of this repository.
  16. query T
  17. SELECT pg_get_constraintdef(pg_constraint.oid) FROM pg_constraint
  18. ----
  19. query B
  20. SELECT pg_get_constraintdef(885) IS NULL
  21. ----
  22. true
  23. query T
  24. SELECT pg_get_constraintdef(pg_constraint.oid, true) FROM pg_constraint
  25. ----
  26. query B
  27. SELECT pg_get_constraintdef(885, true) IS NULL
  28. ----
  29. true