Project

General

Profile

« Previous | Next » 

Revision 12228

schemas/util.sql: added materialize_query()

View differences:

trunk/schemas/util.sql
1528 1528

  
1529 1529

  
1530 1530
--
1531
-- Name: materialize_query(text, text); Type: FUNCTION; Schema: util; Owner: -
1532
--
1533

  
1534
CREATE FUNCTION materialize_query(view_ text, sql text) RETURNS void
1535
    LANGUAGE sql
1536
    AS $_$
1537
SELECT util.create_if_not_exists($$CREATE TABLE $$||quote_ident($1)||$$ AS
1538
$$||$2)
1539
$_$;
1540

  
1541

  
1542
--
1543
-- Name: FUNCTION materialize_query(view_ text, sql text); Type: COMMENT; Schema: util; Owner: -
1544
--
1545

  
1546
COMMENT ON FUNCTION materialize_query(view_ text, sql text) IS 'idempotent';
1547

  
1548

  
1549
--
1531 1550
-- Name: mk_const_col(col_ref, anyelement); Type: FUNCTION; Schema: util; Owner: -
1532 1551
--
1533 1552

  

Also available in: Unified diff