Prev: Core dump running PL/Perl installcheck with bleadperl [PATCH]
Next: [HACKERS] ecpg compiler warning about char* comparison
From: Tom Lane on 7 Mar 2010 18:26 Bruce Momjian <bruce(a)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 -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 8 Mar 2010 19:09 Bruce Momjian <bruce(a)momjian.us> writes: >> I thought some more about it and realized I had to check for the >> on-error-exit flag too. Updated patch attached. > Applied. Shouldn't that be back-patched? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 8 Mar 2010 19:55
Bruce Momjian <bruce(a)momjian.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |