Re: [DOCS] Mention pg_dump version portability

2006-05-16 Thread Jim C. Nasby
On Mon, May 15, 2006 at 07:43:20PM -0400, Bruce Momjian wrote:
> Jim C. Nasby wrote:
> > On Sat, May 13, 2006 at 12:21:06PM -0400, Bruce Momjian wrote:
> > > I have applied this patch that mentions pg_dump portability to 8.1.X and
> > > CVS HEAD.
> > 
> > Would it be worth recommending using the custom format over plain? I see
> > plenty of issues with incompatabilities in the plain version, but I
> > don't think I've ever seen problem with the custom format (though this
> > could just be because everyone uses the default...)
> 
> Right, it is just because it is the default.

But shouldn't the custom format deal better with version changes, or
does the format of custom change just as often? Though, even if it did
change just as often, pg_restore should be able to deal better with it
than psql, since pg_restore knows it's a dump and knows what version
it's coming from...
-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [DOCS] Mention pg_dump version portability

2006-05-16 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> But shouldn't the custom format deal better with version changes, or
> does the format of custom change just as often?

It's completely orthogonal, because the SQL involved is just the same.
One of the tests I periodically run is to compare
pg_dump >foo
pg_dump -Fc | pg_restore >bar
and make sure the outputs are word-for-word the same.

What custom or tar format buys you is the flexibility of extracting
different subsets of the dump after-the-fact, using pg_restore's
switches.  Of course you can do that with a text editor on a plain
dump, if the dump's not too large for your editor to handle ...

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly