· 8 years ago · Jan 25, 2018, 07:32 PM
1mrbx:TWSTrader h4rr$ /Library/PostgreSQL/9.1/bin/pg_dump --username=postgres --password --host=localhost trifecta | head -n 100Password:
2--
3-- PostgreSQL database dump
4--
5
6SET statement_timeout = 0;
7SET client_encoding = 'UTF8';
8SET standard_conforming_strings = on;
9SET check_function_bodies = false;
10SET client_min_messages = warning;
11
12--
13-- Name: trifecta; Type: COMMENT; Schema: -; Owner: trifecta
14--
15
16COMMENT ON DATABASE trifecta IS 'Trifecta database';
17
18
19--
20-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
21--
22
23CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
24
25
26--
27-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
28--
29
30COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
31
32
33SET search_path = public, pg_catalog;
34
35SET default_tablespace = '';
36
37SET default_with_oids = false;
38
39--
40-- Name: historical_data; Type: TABLE; Schema: public; Owner: trifecta; Tablespace:
41--
42
43CREATE TABLE historical_data (
44 id integer NOT NULL,
45 stock_id integer NOT NULL,
46 date date,
47 open double precision,
48 high double precision,
49 low double precision,
50 close double precision,
51 volume bigint,
52 adj_close double precision,
53 adj_open double precision,
54 adj_high double precision,
55 adj_low double precision
56);
57
58
59ALTER TABLE public.historical_data OWNER TO trifecta;
60
61--
62-- Name: historical_data_id_seq; Type: SEQUENCE; Schema: public; Owner: trifecta
63--
64
65CREATE SEQUENCE historical_data_id_seq
66 START WITH 1
67 INCREMENT BY 1
68 NO MINVALUE
69 NO MAXVALUE
70 CACHE 1;
71
72
73ALTER TABLE public.historical_data_id_seq OWNER TO trifecta;
74
75--
76-- Name: historical_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: trifecta
77--
78
79ALTER SEQUENCE historical_data_id_seq OWNED BY historical_data.id;
80
81
82--
83-- Name: historical_data_id_seq; Type: SEQUENCE SET; Schema: public; Owner: trifecta
84--
85
86SELECT pg_catalog.setval('historical_data_id_seq', 679164, true);
87
88
89--
90-- Name: stock_info; Type: TABLE; Schema: public; Owner: trifecta; Tablespace:
91--
92
93CREATE TABLE stock_info (
94 id integer NOT NULL,
95 symbol character varying(25),
96 market character varying(10),
97 url character varying
98);
99
100
101ALTER TABLE public.stock_info OWNER TO trifecta;