Project

General

Profile

« Previous | Next » 

Revision 14131

schemas/util.sql: cluster(): support omitting index to recluster a table

View differences:

trunk/schemas/util.sql
848 848
-- Name: cluster(regclass, regclass); Type: FUNCTION; Schema: util; Owner: -
849 849
--
850 850

  
851
CREATE FUNCTION cluster(table_ regclass, index regclass) RETURNS void
851
CREATE FUNCTION cluster(table_ regclass, index regclass DEFAULT NULL::regclass) RETURNS void
852 852
    LANGUAGE sql
853 853
    AS $_$
854
SELECT util.eval($$CLUSTER $$||table_||$$ USING $$||quote_ident(util.name(index)))
854
SELECT util.eval($$CLUSTER $$||table_
855
||COALESCE($$ USING $$||quote_ident(util.name(index)), ''))
855 856
$_$;
856 857

  
857 858

  

Also available in: Unified diff