Redshift Research Project

System Table Tracker

System view information_schema.check_constraints version 1.0.39009 / 2022-06-08

schema name column data type
information_schema check_constraints check_clause character_data
information_schema check_constraints constraint_catalog sql_identifier
information_schema check_constraints constraint_name sql_identifier
information_schema check_constraints constraint_schema sql_identifier

View Text

SELECT CAST(current_database() AS information_schema.sql_identifier) AS constraint_catalog,
       CAST(rs.nspname AS information_schema.sql_identifier) AS constraint_schema,
       CAST(con.conname AS information_schema.sql_identifier) AS constraint_name,
       CAST(substring(pg_get_constraintdef(con.oid),
                      7) AS information_schema.character_data) AS check_clause
FROM pg_namespace AS rs,
     pg_constraint AS con
     LEFT JOIN pg_class AS c ON c.oid = con.conrelid
     LEFT JOIN pg_type AS t ON t.oid = con.contypid,
     pg_user AS u
WHERE rs.oid = con.connamespace
  AND u.usesysid = COALESCE(c.relowner, t.typowner)
  AND u.usename = CAST("current_user"() AS name)
  AND con.contype = CAST('c' AS "char")


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers