Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Dominic Bevacqua <dominic(dot)bevacqua(at)bpmlogic(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Date: 2010-03-07 23:26:38
Message-ID: 22661.1268004398@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-03-08 00:30:18 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Previous Message Bruce Momjian 2010-03-07 18:07:49 Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-03-08 00:30:18 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Previous Message Josh Berkus 2010-03-07 23:05:29 Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL