Project

General

Profile

« Previous | Next » 

Revision 14457

schemas/util.sql: view_def_to_orig(): use new expansion_min_cols() for easier configuration

View differences:

trunk/schemas/util.sql
6200 6200
regexp_replace(
6201 6201
$1
6202 6202
,
6203
/* unexpand expanded * expressions. any list of 6+ cols from the same table is
6204
treated as a * expression. */
6203
/* unexpand expanded * expressions. any list of >= util.expansion_min_cols()
6204
cols from the same table is treated as a * expression. */
6205 6205
'('||util.aliased_col_re()||'\.)'||util.aliased_col_re()||
6206 6206
	/* 1st col, which lacks separator before.
6207 6207
	*note*: can't prepend \y because it considers only \w chars, not " */
6208 6208
'(,[[:blank:]]*
6209 6209
[[:blank:]]*)\1'||util.aliased_col_re()|| -- 2nd col, which has separator before
6210
'(?:\2\1'||util.aliased_col_re()||'){4,}', --later cols, w/ same table/separator
6210
'(?:\2\1'||util.aliased_col_re()||'){'||(util.expansion_min_cols()-2)||',}',
6211
	-- later cols, with same table and separator as 1st 2
6211 6212
'\1*'/*prefix w/ table*/,
6212 6213
'g')
6213 6214
,

Also available in: Unified diff