Project

General

Profile

« Previous | Next » 

Revision 14489

schemas/util.sql: added date_part_fix()

View differences:

trunk/schemas/util.sql
1814 1814

  
1815 1815

  
1816 1816
--
1817
-- Name: date_part_fix(integer); Type: FUNCTION; Schema: util; Owner: -
1818
--
1819

  
1820
CREATE FUNCTION date_part_fix(date_part integer) RETURNS integer
1821
    LANGUAGE sql IMMUTABLE
1822
    AS $$
1823
SELECT CASE WHEN date_part = 0 THEN 1 ELSE date_part END
1824
$$;
1825

  
1826

  
1827
--
1817 1828
-- Name: debug_print_func_call(text); Type: FUNCTION; Schema: util; Owner: -
1818 1829
--
1819 1830

  

Also available in: Unified diff