From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | exit_horribly vs exit_nicely in pg_dump |
Date: | 2013-11-05 13:46:08 |
Message-ID: | 1324825379.20131105154608@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello.
Examining pg_dump sources recently I've found that different exit
procedure used for the same situations.
A quick example from pg_dump.c:
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)
{
write_msg(NULL, "options --inserts/--column-inserts and -o/--oids cannot be used together\n");
write_msg(NULL, "(The INSERT command cannot set OIDs.)\n");
exit_nicely(1);
}
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.
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2013-11-05 14:01:31 | Re: Row-security writer-side checks proposal |
Previous Message | Robert Haas | 2013-11-05 13:37:51 | Re: pgsql: Remove internal uses of CTimeZone/HasCTZSet. |