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-09 00:55:27
Message-ID: 26256.1268096127@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:
> Tom Lane wrote:
>> Shouldn't that be back-patched?

> Uh, well, it is going to change the behavior of back branches, and
> because we only got one report of the bug which has existed since 8.2, I
> didn't want to risk it. Should I?

I would say that the odds of the initial BEGIN failing are negligible
anyway, so what it boils down to is whether a failure on the final
COMMIT needs to be reported. Seems to me the answer is "yes", and the
only reason we haven't had more complaints is that not too many people
have actually relied on the exit status. Anyone who *does* look at the
exit status is not going to be happy with the current behavior.

In short: it's a bug, fix it.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-03-09 01:10:38 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Previous Message Bruce Momjian 2010-03-09 00:47:19 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2010-03-09 00:59:38 Re: machine-readable pg_controldata?
Previous Message Bruce Momjian 2010-03-09 00:47:19 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint