When a PostgreSQL pg_dump
is done it inserts some comments for each element, as follows.
--
-- Name: my_table; Type: TABLE; Schema: account; Owner: user; Tablespace:
--
CREATE TABLE my_table(
id integer
);
--
-- Name: my_seq; Type: SEQUENCE; Schema: account; Owner: user
--
CREATE SEQUENCE my_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
Is it possible to force pg_dump
to remove (exclude) them? I would like to receive just:
CREATE TABLE my_table(
id integer
);
CREATE SEQUENCE my_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
sed
like this:sed -e '/^--/d'
– Lennie