Revision 13644
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
4449 | 4449 |
CREATE FUNCTION view_def_to_orig(view_def text) RETURNS text |
4450 | 4450 |
LANGUAGE sql IMMUTABLE |
4451 | 4451 |
AS $_$ |
4452 |
/* unexpand expanded * expressions. any list of 5+ cols from the same table is
|
|
4452 |
/* unexpand expanded * expressions. any list of 6+ cols from the same table is
|
|
4453 | 4453 |
treated as a * expression. */ |
4454 | 4454 |
SELECT regexp_replace($1, |
4455 | 4455 |
'((?:"[^"\s]+"|\w+)\.)(?:"[^"\s]+"|\w+)'|| |
Also available in: Unified diff
fix: schemas/util.sql: view_def_to_orig(): require at least 6 cols to avoid false positives in the expansion match pattern