Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I just checked and pg_dump -d _doesn't_ place the INSERT's in a
> transsaction. Seems it should,
I think this is a bad idea. If one were after speed, one would have
used the COPY format in the first place. If one uses INSERTs, there
may be a reason for it --- like, say, wanting each row insertion to
succeed or fail independently. Put a begin/end around it, and you
lose that.
> and perhaps add a:
> SET autocommit TO 'on'
> as well.
This is probably a good idea, since pg_dump scripts effectively assume
that anyway.
> Of course, that SET would fail when restoring to prior
> releases,
Irrelevant; current pg_dump scripts already issue a SET that pre-7.3
servers won't recognize (search_path). A failed SET is harmless anyway,
or should be. (What we really need is for someone to fix pg_restore to
not abort on SQL errors...)
regards, tom lane