Exemple d'une sauvegarde

On voit au début de ce fichier DROP et CREATE qui sont dus à l'utilisation de l'option -cC.

On voit également que le propriétaire de la base de données est défini.

Ici la base est vide donc on ne peut pas constater la création de tables et des insertions dans ces dernières..

1
--
2
-- PostgreSQL database dump
3
--
4
5
-- Dumped from database version 9.6.7
6
-- Dumped by pg_dump version 9.6.7
7
8
SET statement_timeout = 0;
9
SET lock_timeout = 0;
10
SET idle_in_transaction_session_timeout = 0;
11
SET client_encoding = 'UTF8';
12
SET standard_conforming_strings = on;
13
SET check_function_bodies = false;
14
SET client_min_messages = warning;
15
SET row_security = off;
16
17
DROP DATABASE test;
18
--
19
-- Name: test; Type: DATABASE; Schema: -; Owner: postgres
20
--
21
22
CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8';
23
24
25
ALTER DATABASE test OWNER TO postgres;
26
27
\connect test
28
29
SET statement_timeout = 0;
30
SET lock_timeout = 0;
31
SET idle_in_transaction_session_timeout = 0;
32
SET client_encoding = 'UTF8';
33
SET standard_conforming_strings = on;
34
SET check_function_bodies = false;
35
SET client_min_messages = warning;
36
SET row_security = off;
37
38
--
39
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
40
--
41
42
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
43
44
45
--
46
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
47
--
48
49
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
50
51
52
--
53
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
54
--
55
56
GRANT ALL ON SCHEMA public TO PUBLIC;
57
58
59
--
60
-- PostgreSQL database dump complete
61
--
62