Обсуждение: pg_dump : Mysterious"-b" switch
Hello, I notice in pgAdminIII when I get it to perform a backup it uses pg_dump (of course). I also notice that one of the switches/arguments is "-b". When I looked up the PG documentation (http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html) I can't see any reference to "-b". Can anyone explain what it does? Many thanks, -Damian
On Thu, Jul 27, 2006 at 01:57:40PM +1000, Damian C wrote: > I notice in pgAdminIII when I get it to perform a backup it uses > pg_dump (of course). I also notice that one of the switches/arguments > is "-b". When I looked up the PG documentation > (http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html) I > can't see any reference to "-b". The -b option existed in versions prior to 8.1. See the 8.1 Release Notes and the pg_dump documentation for older versions. http://www.postgresql.org/docs/8.1/interactive/release-8-1.html#AEN73747 * Allow pg_dump to dump large objects even in text mode (Tom) With this change, large objects are now always dumped; the former -b switch is a no-op. http://www.postgresql.org/docs/8.0/interactive/app-pgdump.html -b --blobs Include large objects in the dump. A non-text output format must be selected. -- Michael Fuhr
Thanks Michael - that all makes sense. -Damian On 7/27/06, Michael Fuhr <mike@fuhr.org> wrote: > On Thu, Jul 27, 2006 at 01:57:40PM +1000, Damian C wrote: > > I notice in pgAdminIII when I get it to perform a backup it uses > > pg_dump (of course). I also notice that one of the switches/arguments > > is "-b". When I looked up the PG documentation > > (http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html) I > > can't see any reference to "-b". > > The -b option existed in versions prior to 8.1. See the 8.1 Release > Notes and the pg_dump documentation for older versions. > > http://www.postgresql.org/docs/8.1/interactive/release-8-1.html#AEN73747 > > * Allow pg_dump to dump large objects even in text mode (Tom) > > With this change, large objects are now always dumped; the former -b > switch is a no-op. > > http://www.postgresql.org/docs/8.0/interactive/app-pgdump.html > > -b > --blobs > > Include large objects in the dump. A non-text output format must > be selected. > > -- > Michael Fuhr >
"Damian C" <jamianb@gmail.com> writes: > I notice in pgAdminIII when I get it to perform a backup it uses > pg_dump (of course). I also notice that one of the switches/arguments > is "-b". When I looked up the PG documentation > (http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html) I > can't see any reference to "-b". [ digs in source code... ] It's a synonym for "--blobs", and both the full switch and the abbreviation are now obsolete because dumping blobs is now done always. pg_dump still accepts the switch but we don't document it anymore... regards, tom lane