Project

General

Profile

« Previous | Next » 

Revision 13642

bugfix: schemas/util.sql: view_def_to_orig(): don't match whitespace in the middle of a "" identifier, as this could throw off the parser

View differences:

trunk/schemas/util.sql
4452 4452
/* unexpand expanded * expressions. any list of 5+ cols from the same table is
4453 4453
treated as a * expression. */
4454 4454
SELECT regexp_replace($1,
4455
'\y((?:"[^"]+"|\w+)\.)(?:"[^"]+"|\w+)'|| --1st col, which lacks separator before
4455
'\y((?:"[^"\s]+"|\w+)\.)(?:"[^"\s]+"|\w+)'|| --1st col, which lacks separator before
4456 4456
'(,[[:blank:]]*
4457
[[:blank:]]*)\1(?:"[^"]+"|\w+)'|| -- 2nd col, which has separator before
4458
'(?:\2\1(?:"[^"]+"|\w+)){4,}', -- later cols, w/ same table name and separator
4457
[[:blank:]]*)\1(?:"[^"\s]+"|\w+)'|| -- 2nd col, which has separator before
4458
'(?:\2\1(?:"[^"\s]+"|\w+)){4,}', -- later cols, w/ same table name and separator
4459 4459
'\1*'/*prefix w/ table*/, 'g')
4460 4460
$_$;
4461 4461

  

Also available in: Unified diff