Project

General

Profile

« Previous | Next » 

Revision 8180

schemas/functions.sql: Added col_exists()

View differences:

schemas/functions.sql
530 530

  
531 531

  
532 532
--
533
-- Name: col_exists(col_ref); Type: FUNCTION; Schema: functions; Owner: -
534
--
535

  
536
CREATE FUNCTION col_exists(col col_ref) RETURNS boolean
537
    LANGUAGE plpgsql STRICT
538
    AS $$
539
BEGIN
540
    PERFORM functions.col_type(col);
541
    RETURN true;
542
EXCEPTION
543
    WHEN undefined_column THEN RETURN false;
544
END;
545
$$;
546

  
547

  
548
--
533 549
-- Name: col_global_names(regtype); Type: FUNCTION; Schema: functions; Owner: -
534 550
--
535 551

  

Also available in: Unified diff