Project

General

Profile

« Previous | Next » 

Revision 12377

schemas/util.sql: removed unneeded regproc(regprocedure), regprocedure(regproc) because these can actually be directly cast to one another, not just via oid

View differences:

trunk/schemas/util.sql
2325 2325

  
2326 2326

  
2327 2327
--
2328
-- Name: regproc(regprocedure); Type: FUNCTION; Schema: util; Owner: -
2329
--
2330

  
2331
CREATE FUNCTION regproc(func regprocedure) RETURNS regproc
2332
    LANGUAGE sql IMMUTABLE
2333
    AS $_$
2334
SELECT $1::oid::regproc
2335
$_$;
2336

  
2337

  
2338
--
2339
-- Name: regprocedure(regproc); Type: FUNCTION; Schema: util; Owner: -
2340
--
2341

  
2342
CREATE FUNCTION regprocedure(func regproc) RETURNS regprocedure
2343
    LANGUAGE sql IMMUTABLE
2344
    AS $_$
2345
SELECT $1::oid::regprocedure
2346
$_$;
2347

  
2348

  
2349
--
2350 2328
-- Name: regprocedure(text); Type: FUNCTION; Schema: util; Owner: -
2351 2329
--
2352 2330

  
......
2354 2332
    LANGUAGE sql IMMUTABLE
2355 2333
    AS $_$
2356 2334
SELECT (CASE WHEN right($1, 1) = ')'
2357
THEN $1::regprocedure ELSE util.regprocedure($1::regproc) END)
2335
THEN $1::regprocedure ELSE $1::regproc::regprocedure END)
2358 2336
$_$;
2359 2337

  
2360 2338

  

Also available in: Unified diff