Project

General

Profile

« Previous | Next » 

Revision 8142

schemas/functions.sql: Added truncate()

View differences:

schemas/functions.sql
774 774

  
775 775

  
776 776
--
777
-- Name: truncate(regclass); Type: FUNCTION; Schema: functions; Owner: -
778
--
779

  
780
CREATE FUNCTION truncate(table_ regclass) RETURNS void
781
    LANGUAGE plpgsql STRICT
782
    AS $_$
783
BEGIN
784
    EXECUTE $$TRUNCATE $$||table_||$$ CASCADE$$;
785
END;
786
$_$;
787

  
788

  
789
--
790
-- Name: FUNCTION truncate(table_ regclass); Type: COMMENT; Schema: functions; Owner: -
791
--
792

  
793
COMMENT ON FUNCTION truncate(table_ regclass) IS 'idempotent';
794

  
795

  
796
--
777 797
-- Name: join_strs(text, text); Type: AGGREGATE; Schema: functions; Owner: -
778 798
--
779 799

  

Also available in: Unified diff