Главная | Обратная связь | Поможем написать вашу работу!
МегаЛекции

Красным выделена не нужная нам информация, зелёным – нужная, не выделенная – информация об объекте ниже (name и type).

--

-- PostgreSQL database dump

--

 

-- Dumped from database version 9.4.1

-- Dumped by pg_dump version 9.4.1

-- Started on 2015-09-24 19:29:44

 

SET statement_timeout = 0;

SET lock_timeout = 0;

SET client_encoding = 'UTF8';

SET standard_conforming_strings = on;

SET check_function_bodies = false;

SET client_min_messages = warning;

 

--

-- TOC entry 2024 (class 1262 OID 16393)

-- Name: test; Type: DATABASE; Schema: -; Owner: postgres

--

 

CREATE DATABASE "test" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Russian_Russia.1251' LC_CTYPE = 'Russian_Russia.1251';

 

 

ALTER DATABASE "test" OWNER TO "postgres";

 

\connect "test"

 

SET statement_timeout = 0;

SET lock_timeout = 0;

SET client_encoding = 'UTF8';

SET standard_conforming_strings = on;

SET check_function_bodies = false;

SET client_min_messages = warning;

 

--

-- TOC entry 2025 (class 0 OID 0)

-- Dependencies: 6

-- Name: SCHEMA "public"; Type: COMMENT; Schema: -; Owner: postgres

--

 

COMMENT ON SCHEMA "public" IS 'standard public schema';

 

 

--

-- TOC entry 178 (class 3079 OID 11855)

-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:

--

 

CREATE EXTENSION IF NOT EXISTS "plpgsql" WITH SCHEMA "pg_catalog";

 

 

--

-- TOC entry 2027 (class 0 OID 0)

-- Dependencies: 178

-- Name: EXTENSION "plpgsql"; Type: COMMENT; Schema: -; Owner:

--

 

COMMENT ON EXTENSION "plpgsql" IS 'PL/pgSQL procedural language';

 

 

SET search_path = "public", pg_catalog;

 

--

-- TOC entry 531 (class 1247 OID 16432)

-- Name: testdom; Type: DOMAIN; Schema: public; Owner: postgres

--

 

CREATE DOMAIN "testdom" AS numeric(10,4);

 

 

ALTER DOMAIN "testdom" OWNER TO "postgres";

 

--

-- TOC entry 191 (class 1255 OID 16433)

-- Name: add_one(integer); Type: FUNCTION; Schema: public; Owner: postgres

--

 

CREATE FUNCTION "add_one"(integer) RETURNS integer

LANGUAGE "plpgsql"

AS $_$

BEGIN

RETURN $1 + 1;

END;

$_$;

 

 

ALTER FUNCTION "public"."add_one"(integer) OWNER TO "postgres";

 

SET default_tablespace = '';

 

SET default_with_oids = false;

 

--

-- TOC entry 172 (class 1259 OID 16434)

-- Name: TEST1; Type: TABLE; Schema: public; Owner: postgres; Tablespace:

--

 

CREATE TABLE "TEST1" (

"ID" integer NOT NULL,

"NAME" "text"

);

 

 

ALTER TABLE "TEST1" OWNER TO "postgres";

 

--

-- TOC entry 173 (class 1259 OID 16440)

-- Name: TEST1_ID_seq; Type: SEQUENCE; Schema: public; Owner: postgres

--

 

CREATE SEQUENCE "TEST1_ID_seq"

START WITH 1

INCREMENT BY 1

NO MINVALUE

NO MAXVALUE

CACHE 1;

 

 

ALTER TABLE "TEST1_ID_seq" OWNER TO "postgres";

 

--

-- TOC entry 2028 (class 0 OID 0)

-- Dependencies: 173

-- Name: TEST1_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres

--

 

ALTER SEQUENCE "TEST1_ID_seq" OWNED BY "TEST1"."ID";

 

 

--

-- TOC entry 174 (class 1259 OID 16442)

-- Name: TEST2; Type: TABLE; Schema: public; Owner: postgres; Tablespace:

--

 

CREATE TABLE "TEST2" (

"ID" integer NOT NULL,

"NAME" "text"

);

 

 

ALTER TABLE "TEST2" OWNER TO "postgres";

 

--

-- TOC entry 175 (class 1259 OID 16448)

-- Name: TEST2_ID_seq; Type: SEQUENCE; Schema: public; Owner: postgres

--

 

CREATE SEQUENCE "TEST2_ID_seq"

START WITH 1

INCREMENT BY 1

NO MINVALUE

NO MAXVALUE

CACHE 1;

 

 

ALTER TABLE "TEST2_ID_seq" OWNER TO "postgres";

 

--

-- TOC entry 2029 (class 0 OID 0)

-- Dependencies: 175

-- Name: TEST2_ID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres

--

 

ALTER SEQUENCE "TEST2_ID_seq" OWNED BY "TEST2"."ID";

 

 

--

-- TOC entry 176 (class 1259 OID 16450)

-- Name: TEST_VIEW; Type: VIEW; Schema: public; Owner: postgres

--

 

CREATE VIEW "TEST_VIEW" AS

SELECT "TEST1"."ID",

"TEST1"."NAME"

FROM "TEST1";

 

 

ALTER TABLE "TEST_VIEW" OWNER TO "postgres";

 

--

-- TOC entry 177 (class 1259 OID 16454)

-- Name: TEST_VIEW2; Type: VIEW; Schema: public; Owner: postgres

--

 

CREATE VIEW "TEST_VIEW2" AS

SELECT "TEST2"."ID",

"TEST2"."NAME"

FROM "TEST2";

 

 

ALTER TABLE "TEST_VIEW2" OWNER TO "postgres";

 

--

-- TOC entry 1899 (class 2604 OID 16458)

-- Name: ID; Type: DEFAULT; Schema: public; Owner: postgres

--

 

ALTER TABLE ONLY "TEST1" ALTER COLUMN "ID" SET DEFAULT "nextval"('"TEST1_ID_seq"'::"regclass");

 

 

--

-- TOC entry 1900 (class 2604 OID 16459)

-- Name: ID; Type: DEFAULT; Schema: public; Owner: postgres

--

 

ALTER TABLE ONLY "TEST2" ALTER COLUMN "ID" SET DEFAULT "nextval"('"TEST2_ID_seq"'::"regclass");

 

 

--

-- TOC entry 2016 (class 0 OID 16434)

-- Dependencies: 172

-- Data for Name: TEST1; Type: TABLE DATA; Schema: public; Owner: postgres

--

 

INSERT INTO "TEST1" ("ID", "NAME") VALUES (1, 'AZAZA');

 

 

--

-- TOC entry 2030 (class 0 OID 0)

-- Dependencies: 173

-- Name: TEST1_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres

--

 

SELECT pg_catalog.setval('"TEST1_ID_seq"', 1, true);

 

 

--

-- TOC entry 2018 (class 0 OID 16442)

-- Dependencies: 174

-- Data for Name: TEST2; Type: TABLE DATA; Schema: public; Owner: postgres

--

 

--

-- TOC entry 2031 (class 0 OID 0)

-- Dependencies: 175

-- Name: TEST2_ID_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres

--

 

SELECT pg_catalog.setval('"TEST2_ID_seq"', 1, false);

 

 

--

-- TOC entry 1902 (class 2606 OID 16461)

-- Name: TEST1_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:

--

 

ALTER TABLE ONLY "TEST1"

ADD CONSTRAINT "TEST1_pkey" PRIMARY KEY ("ID");

 

 

--

-- TOC entry 1904 (class 2606 OID 16463)

-- Name: TEST2_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:

--

 

ALTER TABLE ONLY "TEST2"

ADD CONSTRAINT "TEST2_pkey" PRIMARY KEY ("ID");

 

 

--

-- TOC entry 2026 (class 0 OID 0)

-- Dependencies: 6

-- Name: public; Type: ACL; Schema: -; Owner: postgres

--

 

REVOKE ALL ON SCHEMA "public" FROM PUBLIC;

REVOKE ALL ON SCHEMA "public" FROM "postgres";

GRANT ALL ON SCHEMA "public" TO "postgres";

GRANT ALL ON SCHEMA "public" TO PUBLIC;

 

 

-- Completed on 2015-09-24 19:29:44

 

--

-- PostgreSQL database dump complete

--

 

Поделиться:





Читайте также:





Воспользуйтесь поиском по сайту:



©2015 - 2024 megalektsii.ru Все авторские права принадлежат авторам лекционных материалов. Обратная связь с нами...