On Wed, Nov  6, 2013 at 08:47:43AM -0500, Peter Eisentraut wrote:
> On 11/5/13, 8:46 AM, Pavel Golub wrote:
> > I suppose this should be call to exit_nicely() for all possible cases.
> > 
> > The only need for calling exit_horribly() is when we are deep down in
> > the multithreaded code, AFAIK.
> 
> Doesn't hurt either, though.  But it would be OK to make this more
> consistent.

Fixed in attached applied patch.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
new file mode 100644
index f5a6bbb..17bb846
*** a/src/bin/pg_dump/pg_dump.c
--- b/src/bin/pg_dump/pg_dump.c
*************** main(int argc, char **argv)
*** 563,572 ****
  		dump_inserts = 1;
  
  	if (dataOnly && schemaOnly)
! 		exit_horribly(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
  
  	if (dataOnly && outputClean)
! 		exit_horribly(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
  
  	if (dump_inserts && oids)
  	{
--- 563,578 ----
  		dump_inserts = 1;
  
  	if (dataOnly && schemaOnly)
! 	{
! 		write_msg(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
! 		exit_nicely(1);
! 	}
  
  	if (dataOnly && outputClean)
! 	{
! 		write_msg(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
! 		exit_nicely(1);
! 	}
  
  	if (dump_inserts && oids)
  	{
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to