Revision 14241
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
6133 | 6133 |
SELECT s.table_, |
6134 | 6134 |
s.name, |
6135 | 6135 |
s.def, |
6136 |
ROW(ROW(s.table_, (s.name)::text), s.def)::check_constraint_def AS constraint_
|
|
6137 |
FROM ( SELECT (pg_constraint.conrelid)::regclass AS table_,
|
|
6136 |
ROW(ROW((s.table_)::regclass, (s.name)::text), s.def)::check_constraint_def AS constraint_
|
|
6137 |
FROM ( SELECT pg_constraint.conrelid AS table_,
|
|
6138 | 6138 |
pg_constraint.conname AS name, |
6139 | 6139 |
trim_parens(pg_constraint.consrc) AS def |
6140 | 6140 |
FROM pg_constraint |
... | ... | |
6146 | 6146 |
-- |
6147 | 6147 |
|
6148 | 6148 |
COMMENT ON VIEW check_constraint IS ' |
6149 |
conrelid: don''t cast to regclass so can use index scan |
|
6150 |
|
|
6149 | 6151 |
consrc: |
6150 | 6152 |
**IMPORTANT**: need to remove the enclosing () to be consistent everywhere. |
6151 | 6153 |
*don''t* use `pg_get_expr(conbin, conrelid, /*pretty-print:*/true)`, |
Also available in: Unified diff
fix: schemas/util.sql: check_constraint view: conrelid: don't cast to regclass so can use index scan