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

2010-03-08 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian 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 woul

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

2010-03-08 Thread Tom Lane
Bruce Momjian 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

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

2010-03-08 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian 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? Uh, well, it is going to change the behavior of back branches, and because we onl

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

2010-03-08 Thread Tom Lane
Bruce Momjian 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@postgresql.or

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

2010-03-08 Thread Bruce Momjian
Bruce Momjian wrote: > BBruce Momjian wrote: > > Tom Lane wrote: > > > Bruce Momjian 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

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

2010-03-07 Thread Bruce Momjian
BBruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian 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).

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

2010-03-07 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian 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

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

2010-03-07 Thread Tom Lane
Bruce Momjian 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 retu

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

2010-03-07 Thread Bruce Momjian
Dominic, sorry you didn't get any reply to your bug report from October, but it was picked up by Robert Haas in January: http://archives.postgresql.org/pgsql-hackers/2010-01/msg00478.php and is now listed as an outstanding 9.0 bug: http://wiki.postgresql.org/wiki/PostgreSQL_9.0_