pg_restore -F bug

Started by Neil Conwayabout 21 years ago4 messagespatches
Jump to latest
#1Neil Conway
neilc@samurai.com

This patch fixes a bug in the error message emitted by pg_restore on an
incorrect -F argument: write_msg() expects its first parameter to be a
"module name", not the format string. Patch applied to HEAD. Is this
worth backporting?

BTW, is there a reason that pg_restore seems to accept 'f', 't', or 'c'
parameters to this argument, but the documentation only documents 't'
and 'c'?

-Neil

Attachments:

pg_restore_format_bug-1.patchtext/x-patch; name=pg_restore_format_bug-1.patchDownload+2-2
#2Bruce Momjian
bruce@momjian.us
In reply to: Neil Conway (#1)
Re: pg_restore -F bug

Neil Conway wrote:

This patch fixes a bug in the error message emitted by pg_restore on an
incorrect -F argument: write_msg() expects its first parameter to be a
"module name", not the format string. Patch applied to HEAD. Is this
worth backporting?

BTW, is there a reason that pg_restore seems to accept 'f', 't', or 'c'
parameters to this argument, but the documentation only documents 't'
and 'c'?

I didn't think pg_restore could use a text file, and I think it emits an
error if you try. Maybe they accept the flag so they can throw a
meaningful error later.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#1)
Re: pg_restore -F bug

Neil Conway <neilc@samurai.com> writes:

This patch fixes a bug in the error message emitted by pg_restore on an
incorrect -F argument: write_msg() expects its first parameter to be a
"module name", not the format string. Patch applied to HEAD. Is this
worth backporting?

Certainly --- particularly if the error makes it dump core, as seems
likely (haven't tried it).

BTW, is there a reason that pg_restore seems to accept 'f', 't', or 'c'
parameters to this argument, but the documentation only documents 't'
and 'c'?

I think the 'f' option is only intended for debugging purposes ...
Philip would know ...

regards, tom lane

#4Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#3)
Re: pg_restore -F bug

Tom Lane wrote:

Certainly --- particularly if the error makes it dump core, as seems
likely (haven't tried it).

Ok, backpatched to stable branches back to 7.2

-Neil