Project

General

Profile

« Previous | Next » 

Revision 10131

schemas/util.sql: added eval_expr() (does not require `SELECT ` before expr)

View differences:

util.sql
776 776

  
777 777

  
778 778
--
779
-- Name: eval_expr(text, anyelement); Type: FUNCTION; Schema: util; Owner: -
780
--
781

  
782
CREATE FUNCTION eval_expr(sql text, ret_type_null anyelement DEFAULT NULL::text) RETURNS anyelement
783
    LANGUAGE sql
784
    AS $_$
785
SELECT util.eval2val($$SELECT $$||$1)
786
$_$;
787

  
788

  
789
--
790
-- Name: FUNCTION eval_expr(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
791
--
792

  
793
COMMENT ON FUNCTION eval_expr(sql text, ret_type_null anyelement) IS 'ret_type_null: NULL::ret_type';
794

  
795

  
796
--
779 797
-- Name: existing_cols(regclass, text[]); Type: FUNCTION; Schema: util; Owner: -
780 798
--
781 799

  

Also available in: Unified diff