Project

General

Profile

« Previous | Next » 

Revision 14293

bugfix: schemas/util.sql: view_body(): need to match view defs without trailing \n

View differences:

trunk/schemas/util.sql
5958 5958
    LANGUAGE sql IMMUTABLE
5959 5959
    AS $_$
5960 5960
-- support both CREATE statements and view bodies
5961
SELECT (SELECT regexp_matches(view_def,'(?w).*?^ *(?:CREATE|SELECT|VALUES)\y.*?;
5962
'))[1] -- (?w) : ^$ multiline but . dotall
5961
SELECT (SELECT regexp_matches(view_def,
5962
'(?w).*?^ *(?:CREATE|SELECT|VALUES)\y.*?;$'))[1]
5963
	-- (?w) : ^$ multiline but . dotall
5963 5964
$_$;
5964 5965

  
5965 5966

  

Also available in: Unified diff