Skip to content

Commit d72f7c4

Browse files
author
Fabien Guiraud
committed
Adding Example sample sql data
1 parent e98fb99 commit d72f7c4

File tree

1 file changed

+184
-0
lines changed

1 file changed

+184
-0
lines changed

sql/data/sample/example.sql

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
--
2+
-- PostgreSQL database dump
3+
--
4+
5+
SET client_encoding = 'LATIN1';
6+
SET standard_conforming_strings = off;
7+
SET check_function_bodies = false;
8+
SET client_min_messages = warning;
9+
SET escape_string_warning = off;
10+
11+
SET search_path = public, pg_catalog;
12+
13+
SET default_tablespace = '';
14+
15+
SET default_with_oids = false;
16+
17+
--
18+
-- Name: example; Type: TABLE; Schema: public; Owner: dev; Tablespace:
19+
--
20+
21+
CREATE TABLE example (
22+
example_id integer NOT NULL,
23+
example_type_id integer DEFAULT 1 NOT NULL,
24+
unique_string text NOT NULL,
25+
string text NOT NULL,
26+
state smallint DEFAULT 1 NOT NULL,
27+
update timestamp without time zone,
28+
creation timestamp without time zone DEFAULT now() NOT NULL
29+
);
30+
31+
32+
ALTER TABLE public.example OWNER TO dev;
33+
34+
--
35+
-- Name: example_example_id_seq; Type: SEQUENCE; Schema: public; Owner: dev
36+
--
37+
38+
CREATE SEQUENCE example_example_id_seq
39+
INCREMENT BY 1
40+
NO MAXVALUE
41+
NO MINVALUE
42+
CACHE 1;
43+
44+
45+
ALTER TABLE public.example_example_id_seq OWNER TO dev;
46+
47+
--
48+
-- Name: example_example_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dev
49+
--
50+
51+
ALTER SEQUENCE example_example_id_seq OWNED BY example.example_id;
52+
53+
54+
--
55+
-- Name: example_example_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dev
56+
--
57+
58+
SELECT pg_catalog.setval('example_example_id_seq', 10, true);
59+
60+
61+
--
62+
-- Name: example_type; Type: TABLE; Schema: public; Owner: dev; Tablespace:
63+
--
64+
65+
CREATE TABLE example_type (
66+
example_type_id integer NOT NULL,
67+
label text NOT NULL,
68+
short_label text NOT NULL,
69+
creation timestamp without time zone DEFAULT now() NOT NULL
70+
);
71+
72+
73+
ALTER TABLE public.example_type OWNER TO dev;
74+
75+
--
76+
-- Name: example_type_example_type_id_seq; Type: SEQUENCE; Schema: public; Owner: dev
77+
--
78+
79+
CREATE SEQUENCE example_type_example_type_id_seq
80+
INCREMENT BY 1
81+
NO MAXVALUE
82+
NO MINVALUE
83+
CACHE 1;
84+
85+
86+
ALTER TABLE public.example_type_example_type_id_seq OWNER TO dev;
87+
88+
--
89+
-- Name: example_type_example_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dev
90+
--
91+
92+
ALTER SEQUENCE example_type_example_type_id_seq OWNED BY example_type.example_type_id;
93+
94+
95+
--
96+
-- Name: example_type_example_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dev
97+
--
98+
99+
SELECT pg_catalog.setval('example_type_example_type_id_seq', 1, true);
100+
101+
102+
--
103+
-- Name: example_id; Type: DEFAULT; Schema: public; Owner: dev
104+
--
105+
106+
ALTER TABLE example ALTER COLUMN example_id SET DEFAULT nextval('example_example_id_seq'::regclass);
107+
108+
109+
--
110+
-- Name: example_type_id; Type: DEFAULT; Schema: public; Owner: dev
111+
--
112+
113+
ALTER TABLE example_type ALTER COLUMN example_type_id SET DEFAULT nextval('example_type_example_type_id_seq'::regclass);
114+
115+
116+
--
117+
-- Data for Name: example; Type: TABLE DATA; Schema: public; Owner: dev
118+
--
119+
120+
COPY example (example_id, example_type_id, unique_string, string, state, update, creation) FROM stdin;
121+
1 1 example1 Test 1 \N 2010-04-09 17:05:09.702641
122+
2 1 example2 Test 1 \N 2010-04-09 17:05:09.704306
123+
3 1 example3 Test 1 \N 2010-04-09 17:05:09.704835
124+
4 1 example4 Test 1 \N 2010-04-09 17:05:09.705347
125+
5 1 example5 Test 1 \N 2010-04-09 17:05:09.705772
126+
6 1 example6 Test 1 \N 2010-04-09 17:05:09.706387
127+
7 1 example7 Test 1 \N 2010-04-09 17:05:09.70682
128+
8 1 example8 Test 1 \N 2010-04-09 17:05:09.707255
129+
9 1 example9 Test 1 \N 2010-04-09 17:05:09.707679
130+
10 1 example10 Test 1 \N 2010-04-09 17:05:09.708111
131+
\.
132+
133+
134+
--
135+
-- Data for Name: example_type; Type: TABLE DATA; Schema: public; Owner: dev
136+
--
137+
138+
COPY example_type (example_type_id, label, short_label, creation) FROM stdin;
139+
1 Type 1 T1 2010-04-21 16:36:29.266905
140+
\.
141+
142+
143+
--
144+
-- Name: example_example_id_key; Type: CONSTRAINT; Schema: public; Owner: dev; Tablespace:
145+
--
146+
147+
ALTER TABLE ONLY example
148+
ADD CONSTRAINT example_example_id_key UNIQUE (example_id);
149+
150+
151+
--
152+
-- Name: example_pkey; Type: CONSTRAINT; Schema: public; Owner: dev; Tablespace:
153+
--
154+
155+
ALTER TABLE ONLY example
156+
ADD CONSTRAINT example_pkey PRIMARY KEY (example_id);
157+
158+
159+
--
160+
-- Name: example_type_example_type_id_key; Type: CONSTRAINT; Schema: public; Owner: dev; Tablespace:
161+
--
162+
163+
ALTER TABLE ONLY example_type
164+
ADD CONSTRAINT example_type_example_type_id_key UNIQUE (example_type_id);
165+
166+
167+
--
168+
-- Name: example__string__idx; Type: INDEX; Schema: public; Owner: dev; Tablespace:
169+
--
170+
171+
CREATE INDEX example__string__idx ON example USING btree (string);
172+
173+
174+
--
175+
-- Name: example_unique_idx; Type: INDEX; Schema: public; Owner: dev; Tablespace:
176+
--
177+
178+
CREATE UNIQUE INDEX example_unique_idx ON example USING btree (unique_string);
179+
180+
181+
--
182+
-- PostgreSQL database dump complete
183+
--
184+

0 commit comments

Comments
 (0)