Project

General

Profile

« Previous | Next » 

Revision 8140

schemas/functions.sql: mk_map_table(): Store map table schema in separate `map` table and extend it using LIKE, for easier maintainability of the map schema

View differences:

schemas/functions.sql
649 649
    PERFORM functions.create_if_not_exists($$
650 650
CREATE TABLE $$||table_||$$
651 651
(
652
      "from" text PRIMARY KEY
653
    , "to"   text
654
);
652
    LIKE functions.map INCLUDING ALL
653
)
655 654
$$);
656 655
END;
657 656
$_$;
......
786 785
);
787 786

  
788 787

  
788
SET default_tablespace = '';
789

  
790
SET default_with_oids = false;
791

  
789 792
--
793
-- Name: map; Type: TABLE; Schema: functions; Owner: -; Tablespace: 
794
--
795

  
796
CREATE TABLE map (
797
    "from" text NOT NULL,
798
    "to" text
799
);
800

  
801

  
802
--
803
-- Data for Name: map; Type: TABLE DATA; Schema: functions; Owner: -
804
--
805

  
806

  
807

  
808
--
809
-- Name: map_pkey; Type: CONSTRAINT; Schema: functions; Owner: -; Tablespace: 
810
--
811

  
812
ALTER TABLE ONLY map
813
    ADD CONSTRAINT map_pkey PRIMARY KEY ("from");
814

  
815

  
816
--
790 817
-- PostgreSQL database dump complete
791 818
--
792 819

  

Also available in: Unified diff