Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Date
Msg-id 22661.1268004398@sss.pgh.pa.us
Whole thread Raw
In response to Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> The attached patch checks for the proper return from BEGIN/COMMIT, and
> properly frees the libpq structures.  In testing, this does return 3 as
> you expected.

Really?  It looks to me like you'd get exit(1).  Maybe that's the right
thing, but MainLoop itself seems to return EXIT_USER not EXIT_FAILURE
when it gets an error.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: psql with GSS can crash
Next
From: Bruce Momjian
Date:
Subject: Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint