Project

General

Profile

« Previous | Next » 

Revision 14384

fix: schemas/util.sql: view_is_subset(): renamed to view_is_subset_or_renaming() because this also supports views that just rename columns, which should not be .*-ed by view_def_to_orig()

View differences:

trunk/schemas/util.sql
6138 6138
    LANGUAGE sql IMMUTABLE
6139 6139
    AS $_$
6140 6140
SELECT CASE
6141
WHEN util.view_is_subset($1) THEN $1
6141
WHEN util.view_is_subset_or_renaming($1) THEN $1
6142 6142
	-- list of cols from the same table is not an expanded * expression
6143 6143
ELSE
6144 6144
regexp_replace(
......
6184 6184

  
6185 6185

  
6186 6186
--
6187
-- Name: view_is_subset(text); Type: FUNCTION; Schema: util; Owner: -
6187
-- Name: view_is_subset_or_renaming(text); Type: FUNCTION; Schema: util; Owner: -
6188 6188
--
6189 6189

  
6190
CREATE FUNCTION view_is_subset(view_def text) RETURNS boolean
6190
CREATE FUNCTION view_is_subset_or_renaming(view_def text) RETURNS boolean
6191 6191
    LANGUAGE sql IMMUTABLE
6192 6192
    AS $$
6193 6193
SELECT util.view_is_automatically_updatable(view_def)

Also available in: Unified diff