Project

General

Profile

« Previous | Next » 

Revision 12592

schemas/util.sql: added show_types_like()

View differences:

trunk/schemas/util.sql
3344 3344

  
3345 3345

  
3346 3346
--
3347
-- Name: show_types_like(text, text); Type: FUNCTION; Schema: util; Owner: -
3348
--
3349

  
3350
CREATE FUNCTION show_types_like(name_regexp text DEFAULT ''::text, schema_regexp text DEFAULT ''::text) RETURNS SETOF regtype
3351
    LANGUAGE sql STABLE
3352
    AS $_$
3353
SELECT oid
3354
FROM pg_type
3355
WHERE typname ~ $1 AND util.schema_matches(util.schema(typnamespace), $2)
3356
ORDER BY typname
3357
$_$;
3358

  
3359

  
3360
--
3347 3361
-- Name: show_views_like(text, text); Type: FUNCTION; Schema: util; Owner: -
3348 3362
--
3349 3363

  

Also available in: Unified diff