Project

General

Profile

« Previous | Next » 

Revision 13841

bugfix: schemas/util.sql: view_def_to_orig(): need to handle cases when list of cols from the same table is not an expanded * expression

View differences:

trunk/schemas/util.sql
4584 4584
CREATE FUNCTION view_def_to_orig(view_def text) RETURNS text
4585 4585
    LANGUAGE sql IMMUTABLE
4586 4586
    AS $_$
4587
SELECT
4587
SELECT CASE
4588
WHEN util.view_is_subset($1) THEN $1
4589
	-- list of cols from the same table is not an expanded * expression
4590
ELSE
4588 4591
regexp_replace(
4589 4592
regexp_replace(
4590 4593
$1
......
4610 4613
'(?:\1(?:"[^"\s]+"|\w+)\.\*)*', -- later tables, w/ same separator
4611 4614
'*',
4612 4615
'g')
4616
END
4613 4617
$_$;
4614 4618

  
4615 4619

  

Also available in: Unified diff