Isn't this patch emitting the BEGIN at the wrong place?
--
-- PostgreSQL database dump
--
SET client_encoding = 'SQL_ASCII';
SET check_function_bodies = false;
SET client_min_messages = warning;
BEGIN;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS 'Standard public schema';
That's not what I would call guaranteeing that all the commands execute
successfully. What if the client encoding is unrecognized, for
instance?
regards, tom lane