Project

General

Profile

« Previous | Next » 

Revision 12376

schemas/util.sql: added quote_func_call()

View differences:

trunk/schemas/util.sql
2233 2233

  
2234 2234

  
2235 2235
--
2236
-- Name: quote_func_call(regprocedure, text[]); Type: FUNCTION; Schema: util; Owner: -
2237
--
2238

  
2239
CREATE FUNCTION quote_func_call(func regprocedure, VARIADIC args_esc text[]) RETURNS text
2240
    LANGUAGE sql IMMUTABLE
2241
    AS $_$
2242
SELECT util.quote_func_call($1::regproc::text, VARIADIC $2)
2243
$_$;
2244

  
2245

  
2246
--
2247
-- Name: quote_func_call(text, text[]); Type: FUNCTION; Schema: util; Owner: -
2248
--
2249

  
2250
CREATE FUNCTION quote_func_call(func_esc text, VARIADIC args_esc text[]) RETURNS text
2251
    LANGUAGE sql IMMUTABLE
2252
    AS $_$
2253
SELECT $1||'('||concat_ws(', ', VARIADIC $2)||')'
2254
$_$;
2255

  
2256

  
2257
--
2236 2258
-- Name: quote_typed(anyelement); Type: FUNCTION; Schema: util; Owner: -
2237 2259
--
2238 2260

  

Also available in: Unified diff