-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo2_dump.sql
More file actions
149 lines (115 loc) · 2.44 KB
/
demo2_dump.sql
File metadata and controls
149 lines (115 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
--
-- PostgreSQL database dump
--
-- Dumped from database version 17.5
-- Dumped by pg_dump version 17.5
SET
statement_timeout = 0;
SET
lock_timeout = 0;
SET
idle_in_transaction_session_timeout = 0;
SET
transaction_timeout = 0;
SET
client_encoding = 'UTF8';
SET
standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET
check_function_bodies = false;
SET
xmloption = content;
SET
client_min_messages = warning;
SET
row_security = off;
DROP
DATABASE IF EXISTS demo2;
--
-- Name: demo2; Type: DATABASE; Schema: -; Owner: demo2
--
CREATE
DATABASE demo2 WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8';
ALTER
DATABASE demo2 OWNER TO demo2;
\connect
demo2
SET statement_timeout = 0;
SET
lock_timeout = 0;
SET
idle_in_transaction_session_timeout = 0;
SET
transaction_timeout = 0;
SET
client_encoding = 'UTF8';
SET
standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET
check_function_bodies = false;
SET
xmloption = content;
SET
client_min_messages = warning;
SET
row_security = off;
--
-- Name: schema1; Type: SCHEMA; Schema: -; Owner: demo2
--
CREATE SCHEMA schema1;
ALTER
SCHEMA schema1 OWNER TO demo2;
--
-- Name: get_person_count(); Type: PROCEDURE; Schema: public; Owner: demo2
--
CREATE PROCEDURE public.get_person_count(OUT result integer)
LANGUAGE plpgsql
AS $$
BEGIN
SELECT COUNT(*)
INTO result
FROM person;
END;
$$;
ALTER PROCEDURE public.get_person_count(OUT result integer) OWNER TO demo2;
--
-- Name: get_person_count(); Type: PROCEDURE; Schema: schema1; Owner: demo2
--
CREATE PROCEDURE schema1.get_person_count(OUT result integer)
LANGUAGE plpgsql
AS $$
BEGIN
SELECT COUNT(*) * 2
INTO result
FROM public.person;
END;
$$;
ALTER PROCEDURE schema1.get_person_count(OUT result integer) OWNER TO demo2;
SET
default_tablespace = '';
SET
default_table_access_method = heap;
--
-- Name: person; Type: TABLE; Schema: public; Owner: demo2
--
CREATE TABLE public.person
(
id character varying(255) NOT NULL,
name character varying(255)
);
ALTER TABLE public.person OWNER TO demo2;
--
-- Data for Name: person; Type: TABLE DATA; Schema: public; Owner: demo2
--
INSERT INTO public.person
VALUES ('bsn234', 'Bartje2');
--
-- Name: person person_pkey; Type: CONSTRAINT; Schema: public; Owner: demo2
--
ALTER TABLE ONLY public.person
ADD CONSTRAINT person_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--