I created a postgres database dump with pg_dump. I would like to now why the backup file is so verbose.
a) What is the purpose of this config:
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_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;
SET default_tablespace = '';
SET default_table_access_method = heap;
b) Why is a creation of a table so verbose:
CREATE TABLE public.tag (
id integer NOT NULL,
name character varying(100) NOT NULL,
description text
);
ALTER TABLE public.tag OWNER TO postgres;
CREATE SEQUENCE public.tag_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tag_id_seq OWNER TO postgres;
ALTER SEQUENCE public.tag_id_seq OWNED BY public.tag.id;
ALTER TABLE ONLY public.tag ALTER COLUMN id SET DEFAULT nextval('public.tag_id_seq'::regclass);
Why not just like I created it before:
CREATE TABLE tag (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
description TEXT
);
c) Why is COPY ... FROM stdin; used rather than INSERT INTO ... VALUES ?
COPY public.tag (id, name, description) FROM stdin;
1 vegetarian No animals.
2 vegan No animal products.
3 vegetable
\.
SELECT pg_catalog.setval('public.tag_id_seq', 3, true);
ALTER TABLE ONLY public.tag
ADD CONSTRAINT tag_pkey PRIMARY KEY (id);